Page 1 of 1

A very basic (read: noob) sqlite question

Posted: Fri Feb 20, 2009 2:03 am
by IndiQa
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

Posted: Fri Feb 20, 2009 2:11 am
by ts-soft
>> how do I put A$ into the table?

Code: Select all

A$ = "apple"
sql.s = "INSERT INTO food (name, weight) VALUES ('" + A$ + "', '10')"
CheckDatabaseUpdate(0, sql) 
greetings
thomas

Posted: Fri Feb 20, 2009 2:21 am
by IndiQa
Thanks man I do appreciate it.

I knew it was simple and now maybe I am a little less...simple that is :-)

Curt

Posted: Fri Feb 20, 2009 3:36 pm
by IndiQa
One other question:

Never mind got it!!

Syntax is my downfall..

Thanks,
Curt

Posted: Sat Feb 21, 2009 1:58 pm
by blueznl