Direct Mode with SQLite in Lazarus 1.4

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tudi_x
Posts: 15
Joined: Thu 09 Jul 2015 17:14
Location: Oklahoma

Direct Mode with SQLite in Lazarus 1.4

Post by tudi_x » Sun 12 Jul 2015 14:12

Hi Support,
I am getting direct mode not supported with Unidac 6.1.4 and Lazarus 1.4. I can see the direct option in the component user interface but in the debugger I am getting that the feature is not supported when I reach conn.Connect.
The code is as below:

Code: Select all

FUNCTION QueryS.Connect(): BOOLEAN;

    BEGIN
          TRY
            conn  := TUniConnection.Create(nil);
            conn.ProviderName  := 'Sqlite';
            conn.Database  := _db_filename;
            conn.SpecificOptions.Values['ForceCreateDatabase'] := 'true';
            conn.SpecificOptions.Values['Direct'] := 'true';

            conn.Connect;
            Result := conn.Connected;  
          EXCEPT
            on Exception DO
                Result := False;
          END;
    END;
Please advise.

Thank you,

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Direct Mode with SQLite in Lazarus 1.4

Post by AlexP » Mon 13 Jul 2015 11:18

Hello,

Currently, Lazarus does not support the Direct mode. In the next version, we will remove these options from the list of available options for SQLite.

tudi_x
Posts: 15
Joined: Thu 09 Jul 2015 17:14
Location: Oklahoma

Re: Direct Mode with SQLite in Lazarus 1.4

Post by tudi_x » Mon 13 Jul 2015 13:12

Hi Alex,
I hope to believe the issue is caused by a limitation in the Free Pascal Compiler/Lazarus and do hope you guys would consider adding this feature again with the new versions of FPC.

Regards,
Last edited by tudi_x on Tue 14 Jul 2015 11:15, edited 2 times in total.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Direct Mode with SQLite in Lazarus 1.4

Post by AlexP » Tue 14 Jul 2015 07:55

It is mentioned on the Compatibility page at https://www.devart.com/unidac/compatibility.html that Direct Mode in SQLite is available only for Delphi and С++ Builder. Such limitation is due to the fact that for Direct Mode we build the .OBJ file from SQLite sources, that we then link into our components. Unfortunately, Lazarus doesn't support the *.OBJ file format - and we can't affect this behavior.

Post Reply