Combine database code?

Hi,
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)") db.Commit Else MsgBox("Database not created") End If

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 db2.encrypt EncodeHex(MD5("123456789")) else msgbox("Failed to encrypt database") end

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.