Topic: missing to convert sqlite DateTime with SqlitePass_0.40? in delphi 7.1

we try to convert Northwind Access Database, specificaly orders table with sqlite expert professional .. with no problem,  but if we access that orders table with SqlitePass_0.40 in a form ... why the Date in  the OrderDate, RequiredDate, and ShippedDate not the same with the original data ..... any suggest for this problem ?... thx.

Last edited by dsutono (2009-01-04 18:07:17)

Re: missing to convert sqlite DateTime with SqlitePass_0.40? in delphi 7.1

I don't have Northwind Access Database but try this :

Open your database with SqliteToolbox and select the orders table.
Look at the tab 'fields definition' to check how those fields are stored. If their Datatype is not DateTime (I guess it will be Date) then you will have to go to Database/Options/CustomFieldDefs and define the fields OrderDate, RequiredDate, and ShippedDate as DateTime. Select Save To Database and Ok to close the form.

You should have your fields corectly displayed now... smile

Let me know or send me you sample db.

I will check this for the next version...coming soon.

Thx.

Luc

Re: missing to convert sqlite DateTime with SqlitePass_0.40? in delphi 7.1

Ok, this is fixed in the 0.41

I will upload the new library by next week.

Re: missing to convert sqlite DateTime with SqlitePass_0.40? in delphi 7.1

sorry i don't have SqliteToolbox .. with the same database ... we try open orders table with lazarus IDE or Sqlite3Explorer or sqlite expert professional ... is correct.

my experiment to build multi-tier application sample with delphi 7, Indy9 (Internet Direct 9), SqlitePass_0.40, SqliteDB v3.6.7, and RemObject Pascal Script (for create an stored procedure sample) ... SqlitePass_0.40 have more speed and simple than Sqlite Components (from aducom) or ZeosDBO v6.6.4 (from Zeos)

where and how i can upload my database sample? ... thanks for your attention.

Re: missing to convert sqlite DateTime with SqlitePass_0.40? in delphi 7.1

adding explanation ... database opening with SqliteToolbox, the datatype is DateTime ..

missing conversion example ... in OrderDate field (original date is 04-07-1996) .. with SqlitePass_0.40 or SqliteToolbox (date is 05-07-0097)

we use ShortDateFormat := 'dd-mm-yyyy';

Last edited by dsutono (2009-01-06 20:58:03)

Re: missing to convert sqlite DateTime with SqlitePass_0.40? in delphi 7.1

You should be able to get the correct result using database.datatypeoptions

The matching date format for databases created with sqliteExpert should be
DateFormat : YYYY-MM-DD
DateStorage : asText
DateTimeFormat : YYYY-MM-DD hh:mm:ss
DateTimeStrorage : dtsText

Please, try this or send your sample database by mail : luckylazarus@free.fr

Be aware that sqlitepass component 0.40 are not "stable" and should not be used in a "real" application since many bugs have to be corrected.

regards

Re: missing to convert sqlite DateTime with SqlitePass_0.40? in delphi 7.1

Thanks for your database.

This setting works correctly (tested with 0.41 library)

DatabaseTest

As you can see here (if you cannot enlarge the picture, do a 'save as' with your browser) :

DatabaseTest

Re: missing to convert sqlite DateTime with SqlitePass_0.40? in delphi 7.1

ok, we'll waiting your SqlitePass_0.41.  now, we'll trying to test the stability of that component/lib with indy9, borland socket, or ASTA 3.1 (for data transport from clients to application server with embedded SqliteDB)).

thanks for all.