TUniConnection in Delphi 2009

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Syncmas
Posts: 1
Joined: Thu 22 Jul 2010 18:52

TUniConnection in Delphi 2009

Post by Syncmas » Thu 22 Jul 2010 18:59

We are currently looking at your product for inclusion in one of our projects and are encountering a problem that I am unable to solve.

Delphi 2009 and SQLite Database 3.6.23

If I drop a UniConnection on a data module, point it to my SQLite database, set my ClientLibrary and "connect" in design mode, everything appears fine in the project.

If I then disconnect during design time and instead try to connect using that same component with variables, the component says it is connected however it then finds none of my tables.

This is the code I am using to utilize that connection, can someone please tell me what i am missing....

if dmSLICData.dbCommon.Connected = false then
begin
dmSLICData.dbCommon.ProviderName := 'SQLite';
dmSLICdata.dbCommon.Database := CommonDBPath;
dmSLICData.dbCommon.SpecificOptions.Values['ClientLibrary'] := 'c:\NextGen\sqlite3.dll';
dmSLICdata.dbCommon.Connect;
end;


Thanks for any help anyone can provide!

Scott

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 26 Jul 2010 09:49

Hello

In the design-time and in the run-time the default application folder is different. Maybe in the run-time and in the design-time you open different databases. So try to set full path to your database, for example, like this:
dmSLICdata.dbCommon.Database := ''c:\NextGen\database.s3db';

Post Reply