Hello together,
has somebody here used TD 6.3 to work with sqlite databases? If yes how did you implement this and what are your experiences with using sqlite as a database in connection with TD 6.3?
Frank
TD 6.3 using sqlite
-
- Founder/Site Admin
- Posts: 3343
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: TD 6.3 using sqlite
Personally I do not have experience with this, but you can find some stuff here:
https://wiki.tdcommunity.net/index.php?title=SQLite
and also here:
https://samples.tdcommunity.net/index.p ... rch_mode=f
Maybe a start...
/EDIT
Here a full article on how to use Sqlite in TD:
https://wiki.tdcommunity.net/index.php/ ... plications
https://wiki.tdcommunity.net/index.php?title=SQLite
and also here:
https://samples.tdcommunity.net/index.p ... rch_mode=f
Maybe a start...
/EDIT
Here a full article on how to use Sqlite in TD:
https://wiki.tdcommunity.net/index.php/ ... plications
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: TD 6.3 using sqlite
As an alternative, you could use SQLite with ODBC. For example
http://www.ch-werner.de/sqliteodbc/
But I've no experience with SQLite connections from ODBC.
Michael
http://www.ch-werner.de/sqliteodbc/
But I've no experience with SQLite connections from ODBC.
Michael
Re: TD 6.3 using sqlite
Hello Michael,mike_fortytwo wrote:As an alternative, you could use SQLite with ODBC. For example
http://www.ch-werner.de/sqliteodbc/
But I've no experience with SQLite connections from ODBC.
Michael
I already had the same idea and tested the ODBC Driver a little bit. In general the Driver is working but I found some confusing things!
I have a table with a field that is defined as "INTEGER NOT NULL AUTOINCREMENT". When receiving data the value that is returned for this field is of type "LONG STRING".
Another thing is that the application is not using the database file that has been defined in the ODBC settings! It looks somewhere else for the .db file and I have no idea why this is the case!
So in the moment therer are some things that are not logical

Frank
Re: TD 6.3 using sqlite
Hi Frank,
I've checked it with a sample and for me it runs fine?!
In my test environment, I've TD 6.3 SP1 running on Windows 7 with the current ODBC driver from http://www.ch-werner.de/sqliteodbc/. The SQLite version is 3.9.2.
My table definition looks like:
I've created an ODBC datasource with the 32-Bit ODBC-Datasource Administrator:
The sourcecode, to get the information from the table looks like:
The result I've get is correct. No SQLError, etc.
Michael
I've checked it with a sample and for me it runs fine?!
In my test environment, I've TD 6.3 SP1 running on Windows 7 with the current ODBC driver from http://www.ch-werner.de/sqliteodbc/. The SQLite version is 3.9.2.
My table definition looks like:
Code: Select all
create table product (
STYLE_ID integer primary key autoincrement not null,
STYLE varchar(30),
DESCRIPTION varchar(254),
PRICE decimal(8, 2),
URL varchar(128),
PROD_LINE_ID integer,
PICTURE blob,
PICTURE_SAL_TYPE integer
);
The sourcecode, to get the information from the table looks like:
Code: Select all
Function: SelectProduct
Local variables
String: sSql
Number: nStyleId
String: sStyle
Number: nFetch
Actions
Set sSql = "select style_id, style from product2 into :nStyleId, :sStyle"
If SqlPrepareAndExecute( hSql, sSql )
If SqlFetchNext( hSql, nFetch )
Call SalMessageBox("Style ID: " || SalNumberToStrX( nStyleId, 0 ) || " - Style: " || sStyle, "Select", MB_Ok )
Michael
You do not have the required permissions to view the files attached to this post.
Who is online
Users browsing this forum: [Ccbot] and 0 guests