SQLite not saving tables?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
SQLite not saving tables?
I have created a stack that follows an example fairly closely on working with SQLite. It works perfectly every time on my mac or windows machine. The issue is that when I build to iOS the database is created with no problem in the documents folder but I cannot seem to save to the database. It doesn't create the tables I am telling it to. Is there something I am doing wrong? I use iPhone explorer to view the db on my computer and can see that no tables have been created.
Re: SQLite not saving tables?
I think the issue was that when copying the database back to the computer it was stripping the databases settings and content. Seems to be working...I just cannot verify that it is visually.
Re: SQLite not saving tables?
ok so the issue isn't that the tables are not being created its that I must not be using the proper syntax to inject data into the tables. Here is my code
The error I get answers back "there is no column 'whatever I've put into the variable' ".
So here the table name is production and there are about 12 columns. Any ideas? thanks so much!
Code: Select all
put "INSERT INTO 'main'.'production' (cname, pname, emailrto) " into tSQL
put "VALUES (" & tcompname & ", " & tprodname & ", " & tert & ");" after tSQL
revExecuteSQL conID, tSQL
answer warning the result
So here the table name is production and there are about 12 columns. Any ideas? thanks so much!
Re: SQLite not saving tables?
Seems a little ridiculous...perhaps its the correct syntax and only way to do it tho.
this works
is there any way to get around the double binary error without using numtochar(39) when trying to use "' &varialbe& '"???
Please let me know if I'm not being clear.
this works
Code: Select all
put "INSERT INTO 'main'.'production' (cname, pname, emailrto) " into tSQL
put "VALUES (" &numtochar(39) & tcompname &numtochar(39) & ", " &numtochar(39) & tprodname &numtochar(39) & ", " &numtochar(39) & tert &numtochar(39) & ");" after tSQL
revExecuteSQL conID, tSQL
answer warning the result
Please let me know if I'm not being clear.