Page 1 of 1

Direct Mode with SQLite in Lazarus 1.4

Posted: Sun 12 Jul 2015 14:12
by tudi_x
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,

Re: Direct Mode with SQLite in Lazarus 1.4

Posted: Mon 13 Jul 2015 11:18
by AlexP
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.

Re: Direct Mode with SQLite in Lazarus 1.4

Posted: Mon 13 Jul 2015 13:12
by tudi_x
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,

Re: Direct Mode with SQLite in Lazarus 1.4

Posted: Tue 14 Jul 2015 07:55
by AlexP
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.