Author Topic: Updated SQLite Demos for 32/64 bit  (Read 2042 times)

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2476
    • View Profile
Updated SQLite Demos for 32/64 bit
« on: June 27, 2022, 01:24:16 PM »
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.


« Last Edit: June 27, 2022, 01:25:49 PM by MrBcx »

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2476
    • View Profile
Using IN-MEMORY databases with SQLITE
« Reply #1 on: November 21, 2022, 07:17:26 AM »
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
« Last Edit: November 21, 2022, 08:08:18 AM by MrBcx »

mekanixx

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Updated SQLite Demos for 32/64 bit
« Reply #2 on: November 21, 2022, 08:46:02 PM »
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
« Last Edit: December 19, 2022, 07:30:53 PM by MrBcx »

spud

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Updated SQLite Demos for 32/64 bit
« Reply #3 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


mekanixx

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Updated SQLite Demos for 32/64 bit
« Reply #4 on: May 10, 2024, 06:21:48 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

  • Full Member
  • ***
  • Posts: 195
    • View Profile
    • Quin's site
Re: Updated SQLite Demos for 32/64 bit
« Reply #5 on: January 30, 2025, 06:12:06 PM »
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 :)