Re: [Lazarus] SQLdb_Tutorial3 error
Op 13-03-2018 12:22 schreef Santiago A. via Lazarus: Thanks. Finally it works. I created the table employee and set the full path of the file. Nevertheless, it looks that sqlite3 is a little... well... sending SIGSEGV is not a valid error, "cant' find file", "table doesn't exits" etc would be much better. I would like to dig a little and try to improve error detection. Is there any way I can debug into open?. I've tried compiling Lazarus IDE with debug, but skips over "open" call. What should I compile in debug mode to parse FQuery.open? I take it you already activated the debugging options (which were disabled in your published project). Otherwise you wouldn't even be able to trace to the Open line. Next problem is that the database sources are not part of the Lazarus IDE. They are from FPC. So you would need to recompile the complete FPC to be able to step through it. (Recompiling Lazarus IDE only compiles the IDE part with debugging information) I use the trunk version from my own script but you could use fpcupdeluxe to install a development version, in which you could trace through the whole source. http://wiki.freepascal.org/fpcupdeluxe Here, I get the correct and expected warnings/errors when using the SQLite3 driver (in both Lazarus 1.9 and 1.8.2). SQLite will automatically create an empty database if it does not exist. After that it should warn about the absence of the employee table. -- Rik -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] SQLdb_Tutorial3 error
El 13/03/2018 a las 11:30, Rik van Kekem via Lazarus escribió: > Op 13-03-2018 10:43 schreef Santiago A. via Lazarus: >> My point is if I'm missing some package, or the dll should be in other >> path, or a hint how to dig and debug deeper, beacuse I can't debug into >> open. > No, the SQLite3.dll and your DB should be sufficient. > > Could you include your .ini file and your SQLite db? > > Normally the firebird employee database is in > C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\EMPLOYEE.FDB > (which you can copy to another location so you can access it) > > But for SQLite you'll need to create your own DB with the correct > table and content. > > Rik Thanks. Finally it works. I created the table employee and set the full path of the file. Nevertheless, it looks that sqlite3 is a little... well... sending SIGSEGV is not a valid error, "cant' find file", "table doesn't exits" etc would be much better. I would like to dig a little and try to improve error detection. Is there any way I can debug into open?. I've tried compiling Lazarus IDE with debug, but skips over "open" call. What should I compile in debug mode to parse FQuery.open? -- Saludos Santiago A. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] SQLdb_Tutorial3 error
Op 13-03-2018 10:43 schreef Santiago A. via Lazarus: My point is if I'm missing some package, or the dll should be in other path, or a hint how to dig and debug deeper, beacuse I can't debug into open. No, the SQLite3.dll and your DB should be sufficient. Could you include your .ini file and your SQLite db? Normally the firebird employee database is in C:\Program Files\Firebird\Firebird_2_5\examples\empbuild\EMPLOYEE.FDB (which you can copy to another location so you can access it) But for SQLite you'll need to create your own DB with the correct table and content. Rik -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] SQLdb_Tutorial3 error
Op 08-03-2018 16:07 schreef Santiago A. via Lazarus: sqlite3.dll is in the same directory that the binary. I have created the table employee, just in case. I don't know what else to check. I can't debug anything else, the debug can't enter in "open" method. Creating the database and table employee wasn't "just in case". It was a requirement if you want to use that example with sqlite. http://wiki.lazarus.freepascal.org/SQLdb_Tutorial3#Getting_database_data_into_normal_controls And surely you changed something (like the .ini) otherwise you end up with Firebird db connection. So zipping your project (with the database) is still best. Tip: You are sure sqlite3.dll has the same 'bitness' (i.e. 32 of 64 bit) as your executable? Rik -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] SQLdb_Tutorial3 error
El 09/03/2018 a las 10:41, Santiago A. via Lazarus escribió: > El 08/03/2018 a las 20:42, leledumbo via Lazarus escribió: >>> Any hint? >> Code please. Zipped project directory (use Publish Project feature) is OK if >> single file example is not possible. > I will zip it, but sure you have it. The code is one of the examples > installed with the standard lazarus 1.8.0 > > In windows: \examples\database\sqldbtutorial3\ > > Error in mainform.pas line 221, using sqlite connector Any suggestion of what could be wrong? Where to look? Any hint? -- Saludos Santiago A. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] SQLdb_Tutorial3 error
> Any hint? Code please. Zipped project directory (use Publish Project feature) is OK if single file example is not possible. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus