The first segment of code below is what I use to create my database:
Dim db As REALSQLdatabase
Dim f As FolderItem
Dim result As Boolean
f = New FolderItem("TR.db")
db = New REALSQLdatabase
db.DatabaseFile = f
result = db.CreateDatabaseFile
If db.Connect() Then
db.SQLExecute("CREATE TABLE Training(TRRef INTEGER PRIMARY KEY, Name TEXT, Department TEXT)")
MsgBox("Database not created")
This second segment of code is what I use to hash the created database:
dim db2 as new REALSQLDatabase
db2.databaseFile = getFolderItem( "TR.db" )
if db2.connect() then
msgbox("Failed to encrypt database")
My question is - can both of these segments be put into the same project file? - if so, are any changes necessary?
Or - is it better to have them in separate project files (as I do at the moment?).
Thank you all in advance.