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

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1431
    • 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: 1431
    • 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

  • Newbie
  • *
  • Posts: 42
    • 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.

As a teaser look at the attached file. :)

Doyle

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1431
    • View Profile
Re: Updated SQLite Demos for 32/64 bit
« Reply #3 on: November 21, 2022, 09:27:36 PM »

As a teaser look at the attached file. :)


Color me teased! I'm looking forward to using it!

mekanixx

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Updated SQLite Demos for 32/64 bit
« Reply #4 on: November 21, 2022, 09:33:55 PM »
:) Got to work out a few bugs in deleting the menus first. Other than that it seems to work just fine!

Doyle