Yes I am a complete db noob.
Am trying to use the sqlite db functions in PB.
I have a sqlite db with table created.
How do I put the data which is in a string variable into the table?
This works:
CheckDatabaseUpdate(0, "INSERT INTO food (name, weight) VALUES ('apple', '10')")
OK I now have the text 'apple' contained in a string variable say A.s or A$
how do I put A$ into the table?
I can verify what works and doesn't work in the database with the sqlitebrowser application.
Thanks,
Curt
A very basic (read: noob) sqlite question
>> how do I put A$ into the table?
greetings
thomas
Code: Select all
A$ = "apple"
sql.s = "INSERT INTO food (name, weight) VALUES ('" + A$ + "', '10')"
CheckDatabaseUpdate(0, sql)
thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )