Lazarus 1.5 ( Trunk Version ) with remobjects

Hi

In this Post:http://talk.remobjects.com/t/german-umlaute-with-lazarus/6041/6

I did try to get some German Umlate ( äüö ) since it look like this is a Lazarus Problem with Lazarus < 1.5 ( like the stable 1.4 ) i did try to use the trunk Version ( installed with http://wiki.lazarus.freepascal.org/fpcup )
I did manage to install REMObjects in Lazarus 1.5 but when i ake the working code from 1.4 ( Lazarus ) i always get this Error:

I now that the Lazarus 1.5 is still in deveopment i just thaugt maybe this is “also” a remobjects Problem…

Shalom
Manfred

I suggest you Codetyphon 5.3

HTH

Hi
I did not wanna say that RemObjekt is not working. In Lazarus it works just fine. :blush:
Since Lazarus 1.5 has full Unicode Support i thaugt i give it a try and found the Problem.

What i forget to mention is that the Error is occurring as soon as i try to Access a Table:

procedure TDM.check_user_access_rights(Sender: TObject);
begin
  RemoteDataAdapter.FillWithDASql(tbl_AccessRights,'SELECT description FROM AccessRights');
  tbl_AccessRights.Open;
  db_rights := tbl_AccessRights.FieldByName('description').AsString;
end;      

The Error “is” in the File lists.inc

function TList.GetCount: Integer;
begin
  Result := FList.Count;
end;

Did also a smal test Projectbased on a RemObject Sample. In azarus 1.4 works fine in 1.5 it does not find the Table on the Server.

you might need to update uDADataTable.pas as :

{$IFDEF FPC}
type
  {$NOTES OFF}
  {$WARNINGS OFF}
  {$HINTS OFF}
  {$MACRO ON}
  TFPC_HACK_DataSource = class(TDataSource)
  end;
  TFPC_HACK_Dataset = class(TComponent)
  Private
 ...
    FCurrentRecord: Longint;
    {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20700)}
    FDataSources : TFPList;
    {$ELSE}
    FDataSources : TList;
    {$IFEND}
  end;

procedure DataSet_GetDetailDataSets(ADataset: TDataset; List: TList);

because they have changed declaration of FDataSources in fpc 2.7+

Thanks for your fast Replay EvgenyK
I came a step forward and getting this Error:

are you using custom DA server or Relativity?

Sorry forgot to mention: Relativity

Hello

Any chances to get the exception server-side stacktrace? Even if the client-side doesn’t deserialize it the stacktrace is still present in the HTTP data sent back from the server and can be viewed using any HTTP traffic interceptor software.

I did a Traffic “record” with Wireshark.
I could send you the trace by Mail if you want.

Shalom
Manfred

Yes, that would be good. Could you also attach the Schema file you are using? Yuo can even delete all other tables from it except the one you are querying.

Did send the Mail to support@remobjects.com ope that is ok.

Thank you for the traffic interception file.

Seems we have here 2 issues:

  1. Server sends back a vague exception message (it had to be “FROM token expected”). That’s loggged and I’ll fix it.
  2. Traffic file shows that something is broken deep in the Data Abstract client side library. Considering there’s no such issues with Delphi compiler this should be a Lazarus issue.

3rd traffic package that contains data request and service response should contain (in its response part) serialized query object containing the DA SQL query (ie ‘SELECT description FROM AccessRights’). But as the file shows query string sent to the server was SELECT description so server was not able to process it.

Thanks for your replay.

  1. Server sends back a vague exception message (it had to be “FROM token expected”). That’s loggged and I’ll fix it.

Thank you.

  1. Traffic file shows that something is broken deep in the Data Abstract client side library. Considering there’s no such issues with Delphi compiler this should be a Lazarus issue.

This sound’s not really good… :confused:
With 1.4 it works but there ( in the Moment ) i have problems with the umlaut. Because of that i thaugt i try 1.5 trunk. It should have better unicode Supoort >> Unicode Support in Lazarus - Free Pascal wiki

Just found out if i just ignore the Error Message i get all Data from The Database.
It look like that it could have a Problem with my User Role Settings…
http://talk.remobjects.com/t/user-role-read-only-read-and-write-or-no-access-deppending-of-ldap-session-infos/6221/10

If a Table has no restrictions i do net get a Error.
But when i start the Application then i get the Error because i check for the User-rights.

procedure TDM.check_user_access_rights(Sender: TObject);
begin
  RemoteDataAdapter.FillWithDASql(tbl_AccessRights,'SELECT description FROM AccessRights');
  tbl_AccessRights.Open;
  db_rights := tbl_AccessRights.FieldByName('description').AsString;
end;