I'm having a weird problem with SQLite. I've done several projects with SQLite so far and all without problems, but then that were projects without date and time fields in the database.
Now I have a project that shows a data entry screen for a table which contains date and time fields. The problem is that whenever I update the date and time fields the database becomes NULL the minute I exit the corresponding data entry field in my program.
See screenshots below (date example):
http://213.10.59.241/flight1.jpgRecord read, no changes made yet.http://213.10.59.241/flight2.jpgDate changed, see the date disappear in the DBGrid (and SQLite)?I tried two ways but both give me the same problem: first solution was to have a DBEdit field connected to the date field in SQLite and my second try was to use an Edit field with an On Exit routine. In this On Exit I updated the date field in SQLite using SQL, and as an alternative I also tried the tables edit and post method.
SQLite table structure as shown in SQLite Developer:
Begin Transaction;
Create TABLE MAIN.[Temp_56581899](
[ID] integer PRIMARY KEY AUTOINCREMENT NOT NULL
,[Vluchtnummer] integer
,[IndicatieDbo] boolean
,[Datum] date(10)
,[Registratie] varchar(10)
,[Type] varchar(25)
,[StartMethode] varchar(25)
,[StartTerrein] varchar(25)
,[StartTijd] time(5)
,[VliegTijd] time(5)
,[Opmerkingen] text
);
Insert Into MAIN.[Temp_56581899] ([ID],[Vluchtnummer],[IndicatieDbo],[Datum],[Registratie],[Type],[StartMethode],[StartTerrein],[StartTijd],[VliegTijd],[Opmerkingen])
Select [ID],[Vluchtnummer],[IndicatieDbo],[Datum],[Registratie],[Type],[StartMethode],[StartTerrein],[StartTijd],[VliegTijd],[Opmerkingen] From MAIN.[Vluchten];
Drop Table MAIN.[Vluchten];
Alter Table MAIN.[Temp_56581899] Rename To [Vluchten];
Commit Transaction;
What am I missing?
Is it my program or could I have defined my SQLite table wrongly?
How to correctly maintain date fields in SQLite?

Jan