Re: [sqlite] Create table - Error code: 21

2017-09-21 Thread Papa
The SQLite3 wrapper class and the client class use std::wstring, however, the wrapper performs the necessary conversion to std::string::data(), before submitting the requests to SQLite3. Nice of you to notice this provable cause. Thanks so much for the help. On 2017-09-21 5:37 PM, Keith

Re: [sqlite] Create table - Error code: 21

2017-09-21 Thread Papa
Sorry, I realized that the example provided in my last email was not as complete as it should have been. I hope the below example would do a better job. - namespace jme{ class Person{ .     std::wstring wapstr; //!< All Purpose Wide String     // Database    

Re: [sqlite] Create table - Error code: 21

2017-09-21 Thread Keith Medcalf
>> convert->toString >Please check this function to make sure it does what you think it >does. What happens if you leave it out and process the raw C string >instead ? You would have to change the string definition to a "normal" ASCII string. It is currently defined as UCS-2 characters and

Re: [sqlite] Create table - Error code: 21

2017-09-21 Thread Papa
Thanks for your help, in regards to your suggestion, here is the actual method that makes the call to createTable. void Person::CreateTable() {     try {     // Name's data     wapstr = L"CREATE TABLE ";     wapstr += table_name;     wapstr += L"(";     wapstr += L"id INT

Re: [sqlite] Create table - Error code: 21

2017-09-21 Thread R Smith
On 2017/09/21 10:07 AM, Papa wrote: The code shows what I have done to create a table, but ::sqlite3_prepare_v2 tells me: --- Exception --- Error message from SQLite3 - bad parameter or other API misuse Error code: 21 Perhaps show us the

Re: [sqlite] Create table - Error code: 21

2017-09-21 Thread Kees Nuyt
On Thu, 21 Sep 2017 04:07:36 -0400, Papa wrote: Just a side-note: >     wapstr += L"id INT PRIMARY KEY NOT NULL, "; "INT PRIMARY KEY" is not enough to create an alias for ROWID, that only happenes with "INTEGER PRIMARY KEY" : ~ $ sqlite3 test.sqlite

Re: [sqlite] Create table - Error code: 21

2017-09-21 Thread Simon Slavin
On 21 Sep 2017, at 9:07am, Papa wrote: > convert->toString Please check this function to make sure it does what you think it does. What happens if you leave it out and process the raw C string instead ? Also check what Clemens wrong. What happens if you try to close the

Re: [sqlite] Create table - Error code: 21

2017-09-21 Thread Clemens Ladisch
Papa wrote: > // *** THE ERROR IS HERE > this->rc = ::sqlite3_prepare_v2(db, > convert->toString(sql_statement_request).c_str(), -1, _sql_statement, > NULL); > if (this->rc != SQLITE_OK) { > this->apstr = "Error message from SQLite3 "; >

[sqlite] Create table - Error code: 21

2017-09-21 Thread Papa
void myClass::CreateTable() {     try {     // Name's data     wapstr = L"CREATE TABLE ";     wapstr += table_name;     wapstr += L"(";     wapstr += L"id INT PRIMARY KEY NOT NULL, ";     wapstr += L"title_name TEXT, ";     wapstr += L"first_name TEXT, ";    

Re: [sqlite] Create table error on AIX -- Unable to open database "mytest": SQL logic error or missing database

2008-04-07 Thread Dennis Cote
Chris Pierce wrote: > > Here's what I'm doing/getting: > > AIX$ ./sqlite3 test.db > SQLite version 3.5.7 > Enter ".help" for instructions > sqlite> create table mytest(first smallint); > Unable to open database "mytest": SQL logic error or > missing database > AIX$ > There is something fishy

Re: [sqlite] Create table error on AIX -- Unable to open database "mytest": SQL logic error or missing database

2008-04-06 Thread Chris Pierce
John Stanton wrote: > > I had a problem compiling Sqlite on ealrier > versions of AIX. It turned out to be a linker > problem and compiling without the -g optimization > solved the problem. The configure process shows an entry that says: checking whether accepts -g... no I edited the

Re: [sqlite] Create table error on AIX -- Unable to open database "mytest": SQL logic error or missing database

2008-04-06 Thread John Stanton
I had a problem compiling Sqlite on ealrier versions of AIX. It turned out to be a linker problem and compiling without the -g optimization solved the problem. What compiler are you using? Xlc or gcc? Chris Pierce wrote: > Hi, > > I am having problems with SQLite v3.5.7 on AIX v5.2. > > I

[sqlite] Create table error on AIX -- Unable to open database "mytest": SQL logic error or missing database

2008-04-05 Thread Chris Pierce
Hi, I am having problems with SQLite v3.5.7 on AIX v5.2. I downloaded the amalgamation tarball. It looks like it builds fine, but I get an error when I try to create a table. Here's what I'm doing/getting: AIX$ ./sqlite3 test.db SQLite version 3.5.7 Enter ".help" for instructions sqlite>

Re: [sqlite] create table error

2007-05-14 Thread allen . zhang
close it. that is for my reason. the relloc memory error! "Mohd Radzi Ibrahim" <[EMAIL PROTECTED]> 2007-05-10 16:44 Please respond to sqlite-users@sqlite.org To <sqlite-users@sqlite.org> cc Subject Re: [sqlite] create table error Could it be that the data

Re: [sqlite] create table error

2007-05-10 Thread Mohd Radzi Ibrahim
Could it be that the data where *sql is pointing to is being re-used somewhere? --radzi. - Original Message - From: <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Thursday, May 10, 2007 3:54 PM Subject: [sqlite] create table error the following is my tes

[sqlite] create table error

2007-05-10 Thread allen . zhang
the following is my test code. just create table. rc = sqlite3_open("zieckey.db", ); char *sql = " CREATE TABLE SensorData(ID INTEGER PRIMARY KEY,SensorID INTEGER,SiteNum INTEGER,Time VARCHAR(12),SensorParameter REAL);" ; sqlite3_exec( db , sql , 0 , 0 , ); sqlite3_close(db); when