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
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
>> 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
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
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
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
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
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 ";
>
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, ";
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
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
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
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>
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
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
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
16 matches
Mail list logo