Updated SQLite Demos for 32/64 bit

Started by MrBcx, June 27, 2022, 01:24:16 PM

Previous topic - Next topic

MrBcx

Dr. Jef Rozenski contributed the original 32-bit example in 2004.

I updated his work a few months  ago with changes that allow his sample to be
translated using current versions of BCX and compiled as either 32-bit or 64-bit.

The zip archive linked below contain 2 project folders, one for 32-bit and the other for 64-bit.

Each folder contains everything you need to rebuild using Pelles C v11.

Each folder also contains current versions of the Sqlite.dll ( as of Feb 2022 )

My included batch files assume that BC.exe is in your path and that Pelles C
is installed at C:\Pellesc.  If that's not the case, you will need to edit the paths
in the batch files to suit your system.



MrBcx

#1
Some of you might already know this but I just learned about it today.

SQLITE provides the use of IN-MEMORY databases. 

As the name suggests, an IN-MEMORY database is created in memory, not on
some type of external storage device (harddisk, CDROM, SSD, M2, thumb drive, etc).

To quickly see this in action only requires you to change one line of code in the (above) examples.

Inside SQ3.bas, change

   rc = sqlite3_open( "sq3.db",&dbHandle)  ' open a database

to

  rc = sqlite3_open( ":memory:",&dbHandle)   ' open a database

Recompile, run, and let your imagination go wild.

Reference:
https://www.sqlite.org/inmemorydb.html

mekanixx

#2
Very Cool! BTW, if anyone needs your sqlite demo example to compile with MSVC and MingW as cpp files let me know and I'll upload it some where.

Doyle

spud

Thank you very much.
I will be able to convert a lot of 32-bit from PowerBASIC.


Mike


mekanixx

Quote from: spud on May 09, 2024, 08:58:39 AM
Thank you very much.
I will be able to convert a lot of 32-bit from PowerBASIC.


Mike

Attached is the demo using MSVC for compiling as a 64 bit app. Have fun!

Doyle

Quin

Wow, this is amazing! Massive kudos to everyone who's worked on this, now I can use my favorite database engine from what is rapidly becoming my favorite BASIC :)
-Quin.
GitHub