Sqlite connection problem

Robert Brenstein rjb at robelko.com
Mon Jan 17 20:41:17 EST 2011


On 15.01.11 at 09:42 +0100 Alessandro Pisoni apparently wrote:
>I have serius connection problem with my database sqlite.
>
>my code is this:
>
>on mouseUp
>   put tAppPath() & "GestPres.db" into tDB
>   put revOpenDatabase("sqlite",tDB,,,,,) into mydb
>   revCloseDatabase mydb
>end mouseUp
>

Are you trying to connect from standalone or in IDE?
Have you tried pretesting the file path?

on mouseUp
   put tAppPath() & "GestPres.db" into tDB
   if there is not a file tDB then
     beep
     replace slash with slash & cr in tDB
     answer error tDB & cr & "File not found."
   else
     put revOpenDatabase("sqlite",tDB,,,,,) into mydb
     revCloseDatabase mydb
   end if
end mouseUp

Robert




More information about the Use-livecode mailing list