Xojo Conferences

MBS Xojo Plugin Tutorial Videos

The source code of our web application

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /kunden/macsw.de/webseiten/monkeybreadsoftware-video/rbformat/rbcode.php on line 244
Class App
Inherits WebApplication
// Properties
Dim db As REALSQLDatabase

// Event implementations
Sub Open()
dim appfolder as folderitem = GetFolderItem("")
dim databaseFile as folderitem = appfolder.parent.child("comments.db")
dim r as new REALSQLDatabase

r.DatabaseFile = DatabaseFile

if DatabaseFile.Exists then
if not r.Connect then
print "Failed to open database: "+r.ErrorMessage
end if


if not r.CreateDatabaseFile then
print "Failed to create database: "+r.ErrorMessage
end if

r.SQLExecute "CREATE TABLE Comments (Name VARCHAR, Email VARCHAR, Country VARCHAR, Content VARCHAR, Date DATETIME)"

if r.Error then
print "Failed to create table: "+r.ErrorMessage
end if
end if

// everything okay:

db = r

End Sub
End Class

All movies

MBS FileMaker blog