Okay, starting to convert an app (Photographer's Mgt. System) from TDbf --> SQLite3. Download and reading thru multiple docs online I am starting with just one form/unit that's just a maintenance form for Countries. It's just a lookup table used thru out the app on forms such as Clients, Contacts, etc. Anyway, the maint. form is just a DBNavigator, DBGrid and a close btn. Simple to migrate but my thinking reading different docs online. My Database has been migrated from TDbf Level 7 to SQLite3 with all the tables and indices. I used DBCopier which did the job instead of writing it all out in a prg.
So, put a SQLite3Connection on the form which I named SQL3PMSDB, SQLQueryCntries, SQLTransactionCntries and a Datasource (DSCntries) on the form which was already built. Eliminated the DBf from the Uses. All I have in the Uses is Db, SQLite3Conn and SQLDB for this form. Below is the modifications which are just 3 Procedures.
procedure TFrmCntriesMaint.FormCreate(Sender: TObject);
begin
SQLite3PMSDB:= TSQLite3Connection.Create(nil); <--Error
SQLite3PMSDB.Connected:= True;
//->SQLite3PMSDB.DatabaseName:= PMSDB;
end;
procedure TFrmCntriesMaint.FormShow(Sender: TObject);
begin
SQLQueryCntries.SQL.Text:= 'select * from COUNTRIES';
Screen.Cursor:= crDefault;
end;
procedure TFrmCntriesMaint.SpdBtnCloseCntriesClick(Sender: TObject);
begin
try
SQLQueryCntries.Close;
finally
SQLTransactionCntries.Active:= False;
SQLite3PMSDB.Connected:= False;
end;
FrmCntriesMaint.Close;
FrmCntriesMaint.Free;
end;
Connection=SQLite3PMSDB0
SQLQuery-DataBase=SQLite3PMSDB (name of the database for whole system_
SQLTransaction-Database=SQLite3PMSDB, Transaction=SQLTransactionCntries
DataSource-DSCntries.DataSet=SQLQueryCntries
Looking at the code snippet, can't understand the error.