This is how I Have created my database in a B4A program. SQL.ExecNonQuery("CREATE TABLE Bosssubs (bosssubno INTEGER PRIMARY KEY, bossno int, desc TEXT, bdate TEXT, btime TEXT, foreign key(bossno) REFERENCES Bosses(bossno) on delete RESTRICT)") SQL.ExecNonQuery("CREATE TABLE Bosses (bossno INTEGER PRIMARY KEY, desc TEXT, sdate TEXT, ssos int, ddate TEXT, dsos int, actioned TEXT,notes TEXT,adate TEXT, atime TEXT, asos int ,cdate TEXT, ctime TEXT, csos int,device text,ccmail text,importance text)") KeirS could I trouble you just one more time to cast your eye over this? Rows For Orderdetails where ordernumber = 10103: " & oCursor.RowCount) OSQL.ExecNonQuery("DELETE FROM ORDERS WHERE ordernumber = 10103") Rows For Orders where ordernumber = 10103: " & oCursor.RowCount) OCursor = oSQL.ExecQuery("Select * from orders where ordernumber = 10103") Log("No Rows For Orderdetails where ordernumber = 10103: " & oCursor.RowCount) OCursor = oSQL.ExecQuery("Select * from orderdetails where ordernumber = 10103") Log("foreign_keys = " & oCursor.GetString2(0)) OCursor = oSQL.ExecQuery("PRAGMA foreign_keys") R.Runmethod2("setForeignKe圜onstraintsEnabled",True,"") ![]() OSQL.Initialize(File.DirDefaultExternal,"fkeytest.db",True) Sub Activity_Create(FirstTime As Boolean)įile.Copy(File.DirAssets,"fkeytest.db",File.DirDefaultExternal,"fkeytest.db") 'These variables can only be accessed from this module. 'These global variables will be redeclared each time the activity is created. 'These variables can be accessed from all modules. 'These global variables will be declared once when the application starts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |