Dbase and SQL lazarus / 16-Databases ---------------------------------------------------------------------- Serpente80 · 2011-10-24 09:46 A really silly question from a noob user, can i run a SQL query on a Dbase Database ? ---------------------------------------------------------------------- felipemdc · 2011-10-24 09:49 I don't know, but you can use all of the usual TDataset methods (Insert, Edit, Post, Fields[], etc) by using the class TDbf which comes with free pascal and in Lazarus is in the "Data Access" component tab. ---------------------------------------------------------------------- Serpente80 · 2011-10-24 09:53 Yes, i know this, but i would use SQL for advanced search because the Filter function it's really ugly ---------------------------------------------------------------------- Serpente80 · 2011-10-24 09:56 And with Sqlite i had trouble installing on Win7 x64 ---------------------------------------------------------------------- BigChimp · 2011-10-24 09:57 Nope, you can't use SQL with the TDBF components included in FreePascal/Lazarus. If you wanted to, you could try to graft on something like TJanSQL onto the dbf dataset, just as Tatamata has done for csv files: http://wiki.lazarus.freepascal.org/ZMSQL#Open_issues.2Fimprovement_ide as ---------------------------------------------------------------------- Serpente80 · 2011-10-24 10:04 I will try this, tnx. ---------------------------------------------------------------------- BigChimp · 2011-10-24 10:06 All in all, I think it is a better idea to fix your sqlite install problems, but I'm certainly not stopping you from implementing SQL on top of DBF as that allows for an all-Pascal solution without need for third party DLLs. It's just that sqlite is very popular nowadays so it's nicely interoperable... Maybe start a post on what problems you hit installing sqlite? Who knows, it might be easily solved by some FPC/sqlite guru ---------------------------------------------------------------------- Serpente80 · 2011-10-24 10:14 I think you're right The issue with Sqlite is this: After installing the component, Lazarus WONT' start, even if i copy the sqlite3.dll in the lazarus directory. This happens on Win7 x64, on WinXP x32 works like a charme ---------------------------------------------------------------------- BigChimp · 2011-10-24 11:23 Any error messages? Are you using 32 bit FPC/Lazarus  => copy a 32 bit sqlite3.dll or 64 bit => needs a 64 bit dll (note: I've never used a 64 bit SQLite dll with Lazarus; too many problems with Firebird databases on Lazarus x64, so I'm sticking with x86/32 bits for now) On my x64 Windows, with 32 bit Lazarus, I copied sqlite3.dll (30 September 2011, 635.392 bytes) into my Lazarus directory. Lazarus from a snapshot a while back (11 October, FPC 2.5.1, SVN revision 32813) Dropping an SQlite3Connection from the SQLDb tab, doing nothing else and running the program works. BTW, you might want to make this a new thread so people can search more easily ---------------------------------------------------------------------- Serpente80 · 2011-10-24 13:04 So, Lazarus 32 bit works on Win7 x64 ? ---------------------------------------------------------------------- otorres · 2011-10-24 13:12 yes, works very good. ---------------------------------------------------------------------- Serpente80 · 2011-10-24 13:13 OMG, i'm a moron  Problem solved, installed 32bit version, and now sqlite installation works. Thank you all of you ---------------------------------------------------------------------- otorres · 2011-10-24 13:25 Quote from: Serpente80 on October 24, 2011, 03:13:33 pmOMG, i'm a moron  Problem solved, installed 32bit version, and now sqlite installation works. Thank you all of you LOL, if you need run Lazarus x64 with sql lite, use dll of sql lite for x64 and works very good too =)