Inserting a record in SQLite in a web app

Hi all
I am start my first web app… & I am obviously missing a stage or something with in the code. I am inserting a record in SQLite. The record shows in the weblistbox but when I quit the app its lost. The code below is run at startup to test to see if the records are saved.

Thanks Chris

Dim vt As String
dim rec as DatabaseRecord
dim vUUID1 As new UUIDMBS
rec = New DatabaseRecord
rec.Column(“DataChangeUUID”) = vUUID1.ValueHexString

self.ProPhotoWebDB.InsertRecord “DataChange”, rec
self.ProPhotoWebDB.Commit

if App.ProPhotoWebDB.Error then
vt = Str(App.ProPhotoWebDB.ErrorCode)
end if

First thing to do is move your code that tests for an error. Commit will effectively clear the error condition from InsertRecord before you get a chance to test it.

self.ProPhotoWebDB.InsertRecord "DataChange", rec

if App.ProPhotoWebDB.Error then
    vt = Str(App.ProPhotoWebDB.ErrorCode)
end if

self.ProPhotoWebDB.Commit