
that's what happens when you start a post and forget about it an hour or two later. Well, what do you know, it worked perfectly! Why can't the official documentation be this clear?Įdit: Ninja'd. $sql = "CREATE TABLE ( TEXT)" // you can declare the column whatever data type you want. I don't play with the cmud sql functions much so I am not going to claim I know how they work, but unless I misread the documentation they don't create tables for you, so before you do the insert you have to create the table. #CALL %sql(test1,"INSERT INTO eq (asd1) VALUES ('asd2')") I am going to assume that asd1 is a column name, so that makes asd2 a literal string (since nothing else makes sense).

In fact, all four sql-related commands/functions have that same, single, very basic example in the documentation.).

Touchcopy 12 error sql logic error or missing database how to#
Are we supposed to figure out how to use these (relatively) new features by trial and error?īTW, if someone else had more luck with their trial and error than I did, and actually knows how to use more than three of the 21 properties/methods of the %sql function, please do post, with examples preferably (I say more than three because there is only one example given, and it only uses three of the properties/methods. Unfortunately, I couldn't figure out how to use that method, since it has absolutely zero documentation, beyond a description. I think you need to use the %sql function's insert method to insert records into your database, but I'm not positive, since the documentation says nothing about it. I'm not sure though, since the documention doesn't say. I believe you can't use insert queries like that, Iliev, only select queries. I have to agree, the documentation for all the sql commands/functions are rather terrible. There is no table eq or field asd1 in it, however when I add those with external viewer, nothing gets added either.Īlso, the help file says to use POST method, but I can't find the syntax :( #call %sql("insert into eq (asd1) values (asd2)") The error message is: SQL logic error or missing database. #call %sql(test1, “insert into eq (asd1) values (asd2)”) It creates a db called test1 in d:\cmud sessions\sessionname #call %sql("INSERT INTO eq (asd1) values (2)") That's extra important when using stuff that contains it's own special characters like () Make sure to put " quotes around the argument to %sql.

So how can I add info, it doesn't seem to work and the help file examples are too few. This is what I type, there's a db that I created with #sqldb eqsql2, eq is a table and asd1 is a field (column) which I created in some sqlite viewer. #call %sql(INSERT INTO eq (asd1) values(2)) Posted: Tue 1:22 pm adding entries to sqlite db
