Could I trouble someone for an example of how to insert a row in a SQLite 
database with a live code array then update that same record with an updated 
array?

put revOpenDatabase("sqlite", thePath, , , , ) into tID
put the "CREATE TABLE ContactData ( " & \
            "myKey integer PRIMARY KEY autoincrement," & \
            "RecordType text," & \
            "RecID text," & \
            "Name text," & \
            "GroupNbr text," & \
            "LastContact, text," & \
            "DaysTill text," & \
            "DataArray blob) "  into tSQL
revExecuteSQL tID, tSQL   
   
I think that I am ok up to here.   I want to insert a record that has a 
RecordType of "0", all other fields empty except I want to put an livecode 
array into DataArray.

This will get the array into text:
 put arrayEncode(tSettings) into tSettings;  put base64Encode(tSettings) into 
tSettings

I am unclear on how to do the insert or an update.  Do I somehow have to create 
a long SQL statement with the actual data in the statement? 

A second database question.  Does the myKey variable automatically get set to a 
unique value when data is inserted? 

Thanks in advance,
    Mike

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to