I have associated the following code with an action on a pushbutton and it seems to work. the purpose of this is to allow the user to select a database. How can I make the database available to other action events associated with a different pushbutton?
[code] //Get the file name
Dim f as FolderItem
Dim dlg as new OpenDialog
dlg.Title = “Open *.sqlite File”
f = dlg.ShowModal()
//Connect to a SQLite database Dim db as new SQLiteDatabase db.DatabaseFile = f If db.Connect = True then 'The connection was successful! Else 'It did not connect MsgBox "An error occured connecting to the database" + EndOfLine +_ db.ErrorMessage return End If[/code]