Recent

Author Topic: Unknown record type:id--sqlite3/SQLdb under windows7  (Read 5778 times)

Goodman H__

  • Full Member
  • ***
  • Posts: 130
Unknown record type:id--sqlite3/SQLdb under windows7
« on: August 13, 2010, 02:46:25 am »
Greetings!

I updated laz to the newest daily snapshot since it  supports unicode strings great.Here is my question:

I am still struggling to manipulate database with several db components provided by laz and also Zeos.I installed TSqlite3DataSet and Zeos both in my Laz.Below is my sqlite3 database DDL:
Code: [Select]
CREATE TABLE test(id small int primary key,name char(40),dateofbirth date);
This db works very well under windows7 both with TSqlite3DataSet and Zeso.But not [[TSQLite3Connection,TSQLTransaction,TSQLQuery]].In TSQLQuery,when I enter a basic sql statement like "select * from test" in the sql...(TStringList),it complains
Code: [Select]
Unknown record type:id

What does this mean?How can I fix it?

It would be grateful if anybody can help.

Regards,
« Last Edit: August 13, 2010, 02:49:36 am by Goodman H__ »
fpc:2.6.1 Lazarus:1.1 SVN39277
OS:win 7

cdbc

  • Sr. Member
  • ****
  • Posts: 310
    • http://www.cdbc.dk
Re: Unknown record type:id--sqlite3/SQLdb under windows7
« Reply #1 on: August 13, 2010, 07:37:15 am »
Hi.
Read the documentation for sqlite3 db...

Your DDL is incorrect:
  CREATE TABLE test(id small int primary key,name char(40),dateofbirth date);

Should be:
  CREATE TABLE test(id integer primary key,name char(40),dateofbirth date);

hth
Regards Benny
If it ain't broke, don't fix it ;)

Goodman H__

  • Full Member
  • ***
  • Posts: 130
Re: Unknown record type:id--sqlite3/SQLdb under windows7
« Reply #2 on: August 13, 2010, 09:37:38 am »
Hi.
Read the documentation for sqlite3 db...

Your DDL is incorrect:
  CREATE TABLE test(id small int primary key,name char(40),dateofbirth date);

Should be:
  CREATE TABLE test(id integer primary key,name char(40),dateofbirth date);

hth
Regards Benny

Thank you so much!The subjected problem fixed though the dbgrid is still not usable with TSQLQuery under my system.

Regards,
fpc:2.6.1 Lazarus:1.1 SVN39277
OS:win 7

 

TinyPortal © 2005-2018