Topic: Problem with string fields

Hello,

thanks for your quick response to my former questions. Next problem:

I created a Database using "Sqlite3.exe" with one table containing an Integer and two  text fields (Nr, Name, country). After connecting your components with additional Datasource and DBGrid, in DBGrid only the numerical field types were shown. In DBEdit, the DataField List also shows only numerical fields. Creating the Database with my preferred program "Sqlite Expert Personal" did'nt improve the result.  Any hints?

regards

W. Reeg

Re: Problem with string fields

Hello Wilhem,

Sqlite engine doesn't natively recognise specific datatypes (for sqlite, everything is first considerated as a string).

So it's quite difficult to map the datatypes stored in a "create statement" of a table to the pascal datatypes because they have to be translated depending on the program which created the database...and there are lot of programs.

SqlitePassDatabase tries to determine which program created the database (by using the file extension). Then a TSqlitePassTranslator is created to handle the mapping between the native data types and the pascal data types.

Presently, only one Kexi translator and one default translator are implemented.

You will notice, when you try to open the sqlite expert demo database with sqliteToolbox that the database type is "Free Pascal" (on the bottom toolbar). In fact, the database type is not correctly recognised.

Anyway, Sqlite Expert Personal seems to be a nice program.

I'll try to write a SqlitePassTranslator implementation for it and to improve the default translator to make it customisable.

Feel free to contribute to this if you want.

regards.

Luc