I am corrected to my database, but when i fire off a command, i get an error.
my table:
a{ id int primary key not null, name varchar not null, and order int not null }
My statement:
string query = "insert or replace into a (id,name,order) values (5,'hi',10)"
int rc;
rc = sqlite3_exec(db, query.c_str(), 0,0,&errMsg);
if(rc != SQLITE_OK){
cout << "Error Code: " << rc << " SQLError: " << errMsg<<endl;
}
I wasnt sure how this is suppose to work. It is triyng to insert. It will see the PK matches…. Then after that, it will replace, will it try to replace the PK with itself? I wasnt sure. The Returned ErrorCode which RC gives is:
1 /* SQL error or missing database */
The table was not created in the DB. One of the dev team changed the schema, dropped old tables, and added new ones without documenting, or giving me any sort of notification.
Should have it resolved though now.