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 Medca
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
s
>> 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 sq
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 PRI
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 entire
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
SQLite version 3.21.0 2
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 db
connection at t
Papa wrote:
> // *** THE ERROR IS HERE
> this->rc = ::sqlite3_prepare_v2(db,
> convert->toString(sql_statement_request).c_str(), -1, &binary_sql_statement,
> NULL);
> if (this->rc != SQLITE_OK) {
> this->apstr = "Error message from SQLite3 ";
> thi
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, ";
wapstr
9 matches
Mail list logo