SQL lite adding records

JB sundown at pacifier.com
Tue Mar 24 20:00:51 EDT 2015


I am using MySql on a local host and
creating a database then adding records.
After creating the table I was using the
handler below to add records.  I was not
using the revCommitDatabase gConID
statement after each record and some
times my database would be missing
one or two records.  After including the
revCommitDatabase gConID statement
it appears to be including them all.  Is
this the proper and fastest way to add
records in a sql lite database or should
I be using something else like a query
to update instead?

on fAddFiles
   set the itemDelimiter to tab
   put fld id 5246 of cd id 5187 into tList
   repeat for each line tLine in tList
      put "INSERT INTO tFiles(recID,field2, field3, field4) VALUES(null," & tLine & ")" into sqTable
      revExecuteSQL gConID,sqTable
      revCommitDatabase gConID
   end repeat
   fRefresh
   gConIDClose
end fAddFiles

Any information or ideas are helpful.

John Balgenorth


More information about the use-livecode mailing list