Recent

Author Topic: Lazarus + Sqlite := 'SQLITE_NOTADB'  (Read 5607 times)

Lathspell

  • Guest
Lazarus + Sqlite := 'SQLITE_NOTADB'
« on: February 11, 2006, 11:39:58 am »
Hi everybody!
Following a guide posted by an user in theese days, I have installed the TSQLITE2DATASET component and create some tables with it, so I put this component and the TDATASOURCE on my main form.
Then I have linked the TDatasource to the Dataset with its "DataSet" property and put two TDBEdit in the form linking them to the TDataSource.
Then I try two ways:

1st: Set the "Active" property of the TSqlite3Dataset on TRUE
2nd: Use this code:

Code: [Select]

{ dbMain is the TSqlite3Dataset name }
dbMain.TableName := 'clienti';
dbMain.SQL := 'Select * from clienti';
dbMain.Open;


In both cases, lazarus return an error:

dbMain: Error returned by sqlite while retrieving data: SQLITE_NOTADB


What I have to do?
(I apologize for my awful english)

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 456
RE: Lazarus + Sqlite :=
« Reply #1 on: February 24, 2006, 12:54:31 am »
Do you set FileName to the datafile path?
How do you created the datafile?
The datafile is from sqlite2 or sqlite3 ?

The error means that sqlite does not recognizes the datafile (FileName) as a valid sqlite3 database.

 

TinyPortal © 2005-2018