Page 1 of 1

TUniConnection in Delphi 2009

Posted: Thu 22 Jul 2010 18:59
by Syncmas
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

Posted: Mon 26 Jul 2010 09:49
by bork
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';