I’ve got a global database property in a module called OrdersDB
Then I got this code as soon as the app launches…
#if LITE then
dim OrdersDb as new SQLiteDatabase #Else
dim OrdersDb as new CubeSQLServer #Endif
The problem is that as soon as the main window is open OrdersDB goes out of scope… How do I get OrderdDB to be either a cubesqlserver or just a sqlitedatabase global property, in my app, depending on Lite = true or not.
I hope I made myself clear.
Thanks for the help.
Wayne… there has to be a global DIM someplace… and this example is creating one of TWO different datatypes… Yes they are both databases, but they are NOT the same class types…
If OrdersDB is a database, then you can cast that property to either SQLiteDatabase Or CubeSQLServer (or odbc, mysql etc) in order apply connection data.
To add a database file to OrdersDB you would use something like
OrdersDB = New Database
SQLiteDatabase(OrdersDB).DatabaseFile = GetFolderItem("c:\\DataHCP.rsd")