For the past 15 years I"ve been programming with Filemaker and XOJO. I've actually come to hate Filemaker and the cost of an annual license for XOJO has gotten to high. I'm looking to Purebasic as a viable alternative. Based on the language reference (online) , I'm trying to access an SQLite database. It seems that my code actually opens the database but beyond that I'm at a loss on how to read the data. My test code is below:
Code: Select all
EnableExplicit ; Force variables to be declared before use
; ********************************************************************
; Variable definitions
; ********************************************************************
Define Filename.s
UseSQLiteDatabase()
Filename = "Test.db"
If OpenDatabase(0,Filename,"" ,"")
Debug "COnnected to Database"
EndIf
If DatabaseQuery(0, "SELECT * FROM Titles") ; Get all the records in the 'employee' table
While NextDatabaseRow(0) ; Loop for each records
Debug GetDatabaseString(0, 0) ; Display the content of the first field
Wend
FinishDatabaseQuery(0)
EndIf
Obviously I'm not doing something correctly. Any help would be greatly appreciated.
Computer configuration:
Early 2014 Mcbook Air
4GB of memory. Macox Big Sur.