Recent

Author Topic: (SOLVED) SQLite3 No data in grid problem.  (Read 1769 times)

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: SQLite3 No data in grid problem.
« Reply #30 on: September 01, 2020, 04:36:15 am »
So I moved the SQlite32 to C:\Windows\SysWOW64.

No change sae error.
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.
« Last Edit: September 01, 2020, 04:40:00 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

TRon

  • Hero Member
  • *****
  • Posts: 536
Re: SQLite3 No data in grid problem.
« Reply #31 on: September 01, 2020, 05:47:50 am »
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.

Also it is rather pointless because no matter how many times you re-install, every time you would run into the same issues over and over again.

You simply seem to be missing a 32-bit version of msvcrt.dll, and I've already posted how you can obtain that file (*) (see also wikipedia ). Simply use a dependency-walker/viewer to obtain this kind of information.

fwiw: this is a standard issue that most developers run into sooner or later and just comes with the territory. You would have more issues with using any other database, as they usually have a whole bunch of dependencies that have to be met. That said, some do come with everything included and have a nice installer. The only other possibility is using a native pascal implemented database such as dbf, cvsdataset, bufdataset, memdataset and alike.

edit
(*) here you go: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

And that for a non-windows user  :D
« Last Edit: September 01, 2020, 06:03:31 am by TRon »

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: SQLite3 No data in grid problem.
« Reply #32 on: September 01, 2020, 06:10:38 am »
"You simply seem to be missing a 32-bit version of msvcrt.dll, and I've already posted how you can obtain that file (*) (see also wikipedia ). Simply use a dependency-walker/viewer to obtain this kind of information."

Say what? Never heard of a dependemcy walker/viewer".
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: SQLite3 No data in grid problem.
« Reply #33 on: September 01, 2020, 06:24:04 am »
Downloaded and installed, same error.
I don't know. going to look fir a dependency walker and  run here
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

TRon

  • Hero Member
  • *****
  • Posts: 536
Re: SQLite3 No data in grid problem.
« Reply #34 on: September 01, 2020, 06:35:26 am »
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/

I used to use a plugin for total commander that was able to do the something similar. Speaking of which, total commander (and its plugins) is another tool that should be part of that same toolbox  ;)

TRon

  • Hero Member
  • *****
  • Posts: 536
Re: SQLite3 No data in grid problem.
« Reply #35 on: September 01, 2020, 06:41:01 am »
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 ?

In case you did then one of the previous discussed topics is the culprit although I do wonder which one that would be though. afaik we've discussed everything that could cause the failure of loading the dll. The only thing I have not done is checking whether free pascal sqlite dll loader checks for a particular version (and fails if that version-check is not met).

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: SQLite3 No data in grid problem.
« Reply #36 on: September 01, 2020, 06:53:17 am »
Yea I'm pretty sure it is SQLite32.Dll.

I could delete it and reinstall. 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.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

TRon

  • Hero Member
  • *****
  • Posts: 536
Re: SQLite3 No data in grid problem.
« Reply #37 on: September 01, 2020, 07:15:30 am »
Yea I'm pretty sure it is SQLite32.Dll.
Ok, just checking  :)

Quote
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).

Quote
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).

Perhaps someone else reading this have had the same experience as you have and knows the answer or perhaps I've simply missed something that someone else knows about and is willing to share ?

rvk

  • Hero Member
  • *****
  • Posts: 4324
Re: SQLite3 No data in grid problem.
« Reply #38 on: September 01, 2020, 07:49:21 am »
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.

THERE IS ONLY sqlite3.def and sqlite3.dll.
And the can both be 32 bit or 64 bit.

My advise:
  • Uninstall sqlite completely.
  • Remove the dll's from system32 and from syswow64
  • Check your bitness of lazarus under help>about (what does it say for you?)
  • If you have 32 bit Lazarus, download the 32 bit zip file for sqlite3.
  • Unzip the sqlite3 zip to your exe directory and the lazarus.exe directory.

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: SQLite3 No data in grid problem.
« Reply #39 on: September 01, 2020, 07:49:58 am »
Ok here is what I did, didn't do any good:

I changed my Path.bat to include C:\Sqlite3;

Created a directory C:\SQLite3
 Rebooted
Recompiled and ran.
Same error.

I downloaded the Dependency but haven't figured out how to run it.I just installed Workflow and Dependency. Maybe I have to download the whole thing.

It's getting late here. Maybe I'm not meant to learn about databases. Least not today.

 
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: SQLite3 No data in grid problem.
« Reply #40 on: September 01, 2020, 07:55:04 am »
"There is no sqlite.dff and no sqlite.dll."
Yes: sqlite3.dff and sqlite3.dll."
I'll try you latest advice and post the results:

FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: SQLite3 No data in grid problem.
« Reply #41 on: September 01, 2020, 08:11:02 am »
My advise:

    Uninstall sqlite completely.                                        (More or less done)
    Remove the dll's from system32 and from syswow64  (DONE)
    Check your bitness of lazarus under help>about (what does it say for you?)

    (See Attached screen shot, Last Line says: x86_64-Win32/64)

    If you have 32 bit Lazarus, download the 32 bit zip file for sqlite3.
    Unzip the sqlite3 zip to your exe directory and the lazarus.exe directory.

Question? Do I have 32 or 64 bit lazarus?
if 64 I assume I should copy The 64 bit  SQLite3.dll exe directory and the lazarus.exe directory.

or reinstall the 32bit lazarus
« Last Edit: September 01, 2020, 08:15:24 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

rvk

  • Hero Member
  • *****
  • Posts: 4324
Re: SQLite3 No data in grid problem.
« Reply #42 on: September 01, 2020, 08:33:42 am »
    (See Attached screen shot, Last Line says: x86_64-Win32/64)
Yeah, that's 64 bit (x86_64)
32 bit would say i386-win32-win32/win64

So you need to downloads the 64 bit version of sqlite3 and unzip it to your .exe directory and to lazarus.exe directory.

JLWest

  • Hero Member
  • *****
  • Posts: 877
Re: (SOLVED) SQLite3 No data in grid problem.
« Reply #43 on: September 01, 2020, 09:49:31 am »
@RVK

I downloaded the 64bit version and put in my system path but not the lazuras dir abd I forgot to install it in the project directory I think.

The project compiled and ran.

A big thanks to TRon and Soner.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

rvk

  • Hero Member
  • *****
  • Posts: 4324
Re: (SOLVED) SQLite3 No data in grid problem.
« Reply #44 on: September 01, 2020, 09:55:19 am »
The two options you have are...

  • Put the files from the matching bitness zip in your .exe directory and your lazarus.exe directory. This is normally the easiest for beginning users to make sure you have the correct files.
  • If you have both 32 and 64 bit Lazarus installed and are mixing bitness, you can put the files from the 32 bit zip in C:\Windows\SysWOW64 and the ones from the 64 bit zip in C:\Windows/System32. That way the system will always pick the correct ones. In that case you need to make sure there aren't any other sqlite3.dlls in your path or exe directory.

 

TinyPortal © 2005-2018