I am trying to run a sql script against a database in a Data Abstract server to make sure that the schema exists. (UniDAC connection to SQLite database). The database is auto-created by UniDAC if it doesn’t exist upon first connection (this is due to using UniDAC’s encryption for the database file).
Any suggestions as to how to accomplish this task?
My first thought is for there to be a flag in the data module that will indicate if the process has already occurred. Set it to false in the data module’s OnCreate handler.
Then in the ConnectionManager’s OnConnectionCreated handler check the flag. If it is false then run the sql script agains the connection. My question boils down to how do I execute a SQL script on the connection interface in that handler?