I hope this is the right place to ask, but here's what's got me stumped: I wrote a small program using PB 6.00 LTS for both 32 bit and 64 bit and using Sqlite for the DB backend. It does everything I want it to do. When I try to recompile for macOS Monterey, the program crashes on the first DatabaseQuery call. The error says the db is not initialized, but it's the same db copied from windows. Here's the relevant code:
define pDB = OpenDatabase(#PB_Any, MyDb$,"", "")
If pDB <> 0
If DatabaseQuery(pdb, "SELECT * FROM InfoPad")
.
.
.
EndIf
EndIf
sqlite windows and macos
Re: sqlite windows and macos
Sorry, I hit post too quickly
Of course there's more code to do actual work but it crashes on that If DatabaseQuery(pdb, "SELECT * FROM InfoPad") statement.
I'm not a database expert and am completely new to MacOs programming so this is probably something I'm doing wrong, just have no clue.
TIA
Russ
Of course there's more code to do actual work but it crashes on that If DatabaseQuery(pdb, "SELECT * FROM InfoPad") statement.
I'm not a database expert and am completely new to MacOs programming so this is probably something I'm doing wrong, just have no clue.
TIA
Russ
Re: sqlite windows and macos
Ok, so the problem was I was defining integer variables as .l and with the windows compilers that worked for either 32 bit or 64 bit. But in the 64 bit Mac compiler (I think latest mac os doesn't support 32 bit, but I could be wrong), things go bad. Changing all of the .l to .i fixed the crashing.