SQLite UNIDAC Question
-
- Posts: 38
- Joined: Wed 16 May 2007 01:12
SQLite UNIDAC Question
Hello,
I'm using UNIDAC for the first time. I have a licensed version of UNIDAC Pro. The installation file is unidac300d14pro.exe.
I have a TUniConnection, TUniQuery, TUniDataSource, and TDBGrid on my form. I specify the database name in the Connection object, and I can set Connected=true, but the TUniQuery does not report any tables in the database. I have found that I can put any name in the Database property and the Connected property is true even though no such database exists. Can you explain how to connect to an SQLite3 database?
Also, when I try to build the program, I get the link error below. I have searched my disk, and there is no such file. I simply ran the install program. Do I have to do anything else?
[ILINK32 Error] Unable to open file 'SQLITEUNIPROVIDER.OBJ'
Thanks,
Joe
I'm using UNIDAC for the first time. I have a licensed version of UNIDAC Pro. The installation file is unidac300d14pro.exe.
I have a TUniConnection, TUniQuery, TUniDataSource, and TDBGrid on my form. I specify the database name in the Connection object, and I can set Connected=true, but the TUniQuery does not report any tables in the database. I have found that I can put any name in the Database property and the Connected property is true even though no such database exists. Can you explain how to connect to an SQLite3 database?
Also, when I try to build the program, I get the link error below. I have searched my disk, and there is no such file. I simply ran the install program. Do I have to do anything else?
[ILINK32 Error] Unable to open file 'SQLITEUNIPROVIDER.OBJ'
Thanks,
Joe
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
-
- Posts: 38
- Joined: Wed 16 May 2007 01:12
1. I have an existing database named "test.db". UNIDAC seems to be able to open that database, but when I test a query that should work, UNIDAC reports that the table does not exist.
2. I added the #pragma "SQLiteUniProvider105", and now the linker reports that OBJ cannot be found.
[ILINK32 Error] Fatal: Unable to open file 'SQLITEUNIPROVIDER105.OBJ'
3. It would be very helpful if the distribution included at least one working example project for CB2010. Could you please try to make a working example?
2. I added the #pragma "SQLiteUniProvider105", and now the linker reports that OBJ cannot be found.
[ILINK32 Error] Fatal: Unable to open file 'SQLITEUNIPROVIDER105.OBJ'
3. It would be very helpful if the distribution included at least one working example project for CB2010. Could you please try to make a working example?
-
- Posts: 38
- Joined: Wed 16 May 2007 01:12
-
- Posts: 38
- Joined: Wed 16 May 2007 01:12
-
- Posts: 38
- Joined: Wed 16 May 2007 01:12
Use the following code to set Database:
Code: Select all
UniConnection.Database := ExtractFilePath(Application.ExeName) + 'test.sql';
-
- Posts: 38
- Joined: Wed 16 May 2007 01:12
Thanks. That's fine for run-time, but we still must specify the absolute path at design-time. It should at least be possible to use ".\test.sql" at design time. It would also be nice to have an option to _not_ create a database if the specified file does not exist. It's impossible to tell that something is wrong if every value is accepted in the Database field.
Joe
Joe