Hi,
i never had any problems to create a Database. No i written a small application with a Setup-Method:
[h]SetupDatabase(f As FolderItem)[/h]
[code]Dim DB As SQLiteDatabase
DB = New SQLiteDatabase
DB.DatabaseFile = f
If DB.CreateDatabaseFile Then
//proceed with database operations…
DB.SQLExecute("CREATE TABLE " + tblFamilyEvents + “(” +_
“EventID INT PRIMARY KEY NOT NULL,” +_
“Type INT,” +_
“Date VarChar” +_
“)”)
DB.SQLExecute("CREATE TABLE " + tblPersonalEvents + “(” +_
“EventID INT PRIMARY KEY NOT NULL,” +_
“Type INT,” +_
“Date VarChar” +_
“)”)
DB.SQLExecute("CREATE TABLE " + tblPersonalAttributes + “(” +_
“AttributeID INT PRIMARY KEY NOT NULL,” +_
“Type INT,” +_
“Date VarChar” +_
“)”)
Else
MsgBox("Database not created. Error: " + db.ErrorMessage)
End If[/code]
I also made a Button-Click-Event:
[code]Dim f As FolderItem = GetSaveFolderItem("", “”)
If f <> Nil Then
SetupDatabase(f)
Dim dbr As New DatabaseRecord
dbr.IntegerColumn(“Type”) = 2
dbr.Column(“Date”) = “11 JAN 1934”
DB.InsertRecord(tblPersonalEvents, dbr)
End If[/code]
So the Database will create correctly but the Record will not inserted. Why?
Best regards