AS far as the tutorials go There are very few about SQl3 and Lazarus and they arn't very good.You shouldn't explicitly be looking at sqlite3 tutorials, rather SQLDB related tutorials.
Ok Here is my program attached. AS far as the tutorials go There are very few about SQl3 and Lazarus and they arn't very good.Only DBConnection.Connectortype changes, everthing else stays same.
I'm now following Tweaking4All , Getting stated with SQLite3. However, it's dated 10/09/2013 which means it may be out of date.It is a bit outdated and minimalistic , but should still work.
I think the zip is corrupt.There seem to be nothing wrong with the zip-file.
loading the project into LazarusSo it is indeed related to incompatible Lazarus project files.
My editor goes to full screen and hangs there. Have to use the task manager to get out.
I think something like this would cut the learning curve on SQL and Lazarus by 75%.And that is exactly what this tutorial is doing, https://wiki.freepascal.org/SQLdb_Tutorial1, albeit it is more general but does mention what to change in case using sqlite.
If I can't get it to work may ask for a working example.That is perfectly ok.
Something that confuse me is installation of SQLlite3.Windows.... and it s quirks :)
One demo said the SQLite.DLL should be in your project directory and C:\Windows\System
It's the only place I have seen this. Anyway I copied it to both places.
When you have Windows 64 bit then put:.. and for more detailed information, see also https://www.howtogeek.com/326509/whats-the-difference-between-the-system32-and-syswow64-folders-in-windows/
32-Bit sqlite3.dll in C:\Windows\SysWOW64 folder,
and 64-bit sqlite3.dll in C:\Windows\C:\Windows\System32 folder.
Maybe you will see in DBGRid same text "(MEMO)", it isn't error. SQLite is not real database, it handles all strings as memo-field. Look at this thread (https://forum.lazarus.freepascal.org/index.php/topic,19339.msg110012.html).
For ZEOS-Components you must put "Undefined_Varchar_AsString_Length=255" in DBConnection.Params, but it doesn't worked here.
I don't have a SQlConection to confighre so it must be a line of code ot looking for,I would have to look into that. My sqlite shared library is installed globally and didn't cause such an issue for me.
From this mechanism it follows that before a particular connection type can be used, its definition must be present in the list of connector types. This means that the unit of the connection type (ibconnection, pqconnection etc.) must be included in the uses clause of the program file: if it is not included, the connection type will not be registered, and it will not be available for use in the universal connector.afaik, that part I have covered in my comments/instructions, e.g. that you should add unit "sqlite3conn" to your uses clause.
The universal connector only exposes the properties common to all connection types (the ones in TSQLConnection). It does not expose properties for all the properties available in specific TSQLConnection descendents. This means that if connection-specific options must be used, they must be included in the Params property of the universal connector in the form Name=Value. When the actual connection instance is created, the connection-specific properties will be set from the specified parameters.... and I seem unable to locate any evidence of the existence of any code that provides the name of the library using the parameters property :(
I Wonder. I'm using 32bit SQlite for sure. My IDE I think May be 64Bit: How can I confirm that.Lazarus/help/about or Lazarus/view/IDE internals/about FPC (don't forget about the second tab)
(11) Why do I get a DllNotFoundException (for "sqlite3.dll" or "SQLite.Interop.dll") when trying to run my application?And also with regards to the dependencies that means that those redistributable should match the bitness of your produced executable.
Either the named dynamic link library (DLL) cannot be located or it cannot be loaded due to missing dependencies. Make sure the named dynamic link library is located in the application directory or a directory along the system PATH and try again. Also, be sure the necessary Visual C++ runtime redistributable has been installed unless you are using a dynamic link library that was built statically linked to it.
I have I think 32Bit Target set in IDE,If you previous post is indeed correct then you have created a 32-bit application.
32Bit DB browser that created the DBThe data can be created with any application, even with an application that runs on linux/macos or otherwise. The data itself is platform agnostic.
and SQLiite3.dll in C:\Windows\System32 and the project directory.And what bitness does your OS have ? ( https://www.howtogeek.com/howto/21726/how-do-i-know-if-im-running-32-bit-or-64-bit-windows-answers/ )
I made mistake in example:
procedure TForm1.FormDestroy(Sender: TObject); begin SQLQuery1.Active:=false; // this should false DBConnection.Connected:=false; end;
There was nothing wrong with zip, now I saved it with Lazarus 1.8.4.
When you cannot see some files then go [menu]>[project]>[project inspector] and click on some file that you want see.
When you cannot see some form then go [menu]>[window]> [center lost window] and select any window that you want to see.
When you open some project and lazarus shows error something like "property not existent", then click ingore and save form again, because some property does not more exist. I am using modified LCL, especially DBGrid.
I have a 64bit operating system, Is that the problem.In that case, please update your signature to include that.
When you have Windows 64 bit then put:
32-Bit sqlite3.dll in C:\Windows\SysWOW64 folder,
and 64-bit sqlite3.dll in C:\Windows\C:\Windows\System32 folder.
I think the only thing left to do is wipe the system clean. The IDE, FPC, SQL DB Browser and start over. I dont know that's its worth it.I fail to see the logic in that. Of course that isn't worth it.
Say what? Never heard of a dependemcy walker/viewer".A dependency walker/viewer should be part of the toolbox of every windows developer, see also https://dependencywalker.com/
Downloaded and installed, same error.In that case there is another issue. If you installed the complete redistributable then that should be enough. Are you sure you downloaded https://sqlite.org/2020/sqlite-dll-win32-x86-3330000.zip ?
Yea I'm pretty sure it is SQLite32.Dll.Ok, just checking :)
I could delete it and reinstall.Like I wrote before: reinstalling your OS and all that won't help you a bit. It rather destroys the chance to figure out what is the culprit (so that you'll never forget about that again and a chance to learn something from it).
but sqlite-dll-win32-x86-3330000.zip and when un-ziped I had SQLite.dff and SQLite.Dll A I suppose to do something with the dff file.I could not find any evidence that the dll itself is using the definition (.def) file, but I could imagine other (3-th party) applications might perhaps depend in it. I've seen many websites mention to just copy it alongside the sqlite3.dll file. It can't hurt (it is just a simple text file).
Yea I'm pretty sure it is SQLite32.Dll.There is no file sqlite32.dll
but sqlite-dll-win32-x86-3330000.zip and when un-ziped I had SQLite.dff and SQLite.Dll A I suppose to do something with the dff file.There is no sqlite.dff and no sqlite.dll.
(See Attached screen shot, Last Line says: x86_64-Win32/64)Yeah, that's 64 bit (x86_64)
The two options you have are...Thank you for having explained that, as I wasn't sure about the IDE being one bitness and target (for which is compiled) being another.
The project compiled and ran.Congratulations 8-)
Yes, that's one possibility... compiling 32 bit on a 64 bit IDE. In that case you need 64 bit dll in lazarus.exe directory and 32 bit in your project.exe directory.The two options you have are...Thank you for having explained that, as I wasn't sure about the IDE being one bitness and target (for which is compiled) being another.
So for me, one time I can compile a project in 32 bit and the other time in 64 bit. In that case it is handy to have them (both 32 and 64 bit dlls) in the appropriate system directory. Otherwise I keep switching those dlls in and out :DYes, exactly the latter :D