SQlite3 and Lazarus lazarus / 16-Databases ---------------------------------------------------------------------- Eric_Jourde · 2005-10-12 12:19 Hi, i just re-test the last version of Lazarus, and i found it wonderfull !!! I works on porting a delphi application on it, during 4 hours without any crachs !! great works mans ! I have currently a working sqlite3 unit for lazarus. Does a package is necesary for the community ? I hope make a little front-end for sqlite3 database ! to test it and then use it the make some sqlite3 developpment ! I could publish the front-end like sample application. Thanks again for this work ! E.Jourde ---------------------------------------------------------------------- felipemdc · 2005-10-12 18:39 Can you put your program source-code on a place where we can get it? I'm trying to access sqlite myself, but I haven't succeded yet. There is already a package for sqlite, but packages are never too many =). Even if it is not included on Lazarus it would be nice to have one on a package repository. You can find information about it here: http: //wiki.lazarus.freepascal.org/index.php/Lazarus_Database_Tutorial. ---------------------------------------------------------------------- Eric_Jourde · 2005-10-12 19:41 ok i could put the source somewhere ! i write a litte wiki. sqlite3 works very well ! eric ---------------------------------------------------------------------- LuizAmérico · 2005-10-12 21:05 There's already support for sqlite3 in the svn version (2.0.1) of fpc and also a package for Lazarus, but since there's no released version of fpc that includes it, i did not published/uploaded the package to avoid break compatibility with the people using fpc 2.0.0 If you want to try you can get in the svn repository: base sqlite3: http://svn.freepascal.org/svn/fpc/branches/fixes_2_0/packages/base/sql ite/sqlite3.pp TDataset descendants  http://svn.freepascal.org/svn/fpc/branches/fixes_2_0/fcl/db/sqlite/cu stomsqliteds.pas http://svn.freepascal.org/svn/fpc/branches/fixes_2_0/fcl/db/sqlite/sql iteds3.pas ---------------------------------------------------------------------- Anonymous · 2005-12-03 17:07 your sqlite3 package works with the lazarus snapshot? if so, please publish! at the moment all works with testapiv3x but i see i need the package to obtain the visual component.. (sorry for my english and for my noob writing..  :wink: ) ---------------------------------------------------------------------- Anonymous · 2005-12-04 02:56 Yes, it works. See http://www.geocities.com/camara_luiz/sqlitepackage.zip It requires fpc201 or above. I'm waiting for release of fpc202 to send to Lazarus developers ---------------------------------------------------------------------- Anonymous · 2005-12-04 10:08 i am sorry for being boring... but: Sqlite3DataSet1.ExecSQL('CREATE TABLE TPezzi (Code varchar (50), First_Name INTEGER PRIMARY KEY)'); gives me Sqlite3DataSet1: Field type 'VARCHAR (50)' not recognized. i use Lazarus-0.9.11-20051129-win32.exe with the installed package you posted above. i dont know which version of fpc has the lazarus 20051129.. ---------------------------------------------------------------------- Anonymous · 2005-12-23 17:23 Instead of Varchar(50) use only Varchar. For sqlite they are equivalent (sqlite ignores the length delimiter) Luiz ---------------------------------------------------------------------- Anonymous · 2006-01-09 13:49 works!! :* ---------------------------------------------------------------------- pfranchuk · 2006-01-17 02:31 Quote from: "Anonymous"Instead of Varchar(50) use only Varchar. For sqlite they are equivalent (sqlite ignores the length delimiter) Luiz Then why don't you fix the component so that it also ignores the length delimiter?  Then I could use my existing db's with new lazarus programs. ---------------------------------------------------------------------- pfranchuk · 2006-02-02 02:07 Quote from: "Anonymous"Instead of Varchar(50) use only Varchar. For sqlite they are equivalent (sqlite ignores the length delimiter) Luiz OK, I did it myself. Just add: if pos('CHAR',ColumnStr)>0 then ColumnStr:= 'VARCHAR'; just before the case statement assigning field types. This takes care of the CHAR as well as VARCHAR(n) declaratiions in previously created DB's ---------------------------------------------------------------------- LuizAmérico · 2006-02-23 23:58 I already fixed this among many other things. I'm setting a page for sqlite/fpc and when i upload it i will do a post. UPDATE: Here you can find latest sqlite component: http://www.geocities.com/camara_luiz/sqlite4fpc/index.html