Recent

Author Topic: SQLite3 and problem with date in TdbGrid  (Read 4604 times)

PetrHH

  • Newbie
  • Posts: 3
SQLite3 and problem with date in TdbGrid
« on: May 30, 2007, 10:25:05 am »
Good morning,

I use TSqlite3Dataset connected to DataSouce and TDbGrid. I have simple table created by SQL := 'CREATE TABLE test (mydate DATE)';

I tried to save record using SQL := 'INSERT INTO test (mydate) VALUES ('2007-05-30')';

In Tdbgrid are empty records. If I open the database in SQliteExprert, records are correct. If I insert record using INSERT INTO test (mydate) VALUES (2007-05-30), in Tdbgrid is date 25.1.1905.

The same problem is in Linux. Lazarus is last daily snapshot and fpc 2.0.4.


Could you help me, please?

Thanks!


Petr

PetrHH

  • Newbie
  • Posts: 3
RE: SQLite3 and problem with date in TdbGrid
« Reply #1 on: May 30, 2007, 12:50:51 pm »
The same problem is also without Lazarus. In fpc program Q.FieldByName('mydate').AsDateTime returns null, too. It looks like an error in fpc. I'll try fpc 2.1.5.

Anybohy know what is wrong?

Thnaks for help.

Petr

PetrHH

  • Newbie
  • Posts: 3
RE: SQLite3 and problem with date in TdbGrid
« Reply #2 on: May 31, 2007, 01:14:48 pm »
Version 2.1.5 has the same problem. Could anyone report this to bugzilla? I don't know how to do it and where. Thanks.

Petr

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
RE: SQLite3 and problem with date in TdbGrid
« Reply #3 on: May 31, 2007, 04:26:22 pm »
See the bugtracker link in the mainmenu, topleft of this page
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
RE: SQLite3 and problem with date in TdbGrid
« Reply #4 on: June 11, 2007, 02:24:00 am »
See http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtopic&t=1704 and you will understand the problem and find a solution.

 

TinyPortal © 2005-2018