Xojo Conferences
MBSOct2019CologneDE
XDCMarch2020NashvilleUS

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
quit(1)
end if

else

if not r.CreateDatabaseFile then
print "Failed to create database: "+r.ErrorMessage
quit(2)
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
quit(3)
end if
end if

// everything okay:

db = r

End Sub
End Class


All movies




Links
MBS Xojo Plugins