Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-22 Thread Simon Slavin
On 22 Jun 2012, at 5:13pm, "Arbol One" wrote: > http://www.sqlite.org/cvstrac/wiki?p=ManagementTools > Since there seems to be a confusion about the application I am using to view > the newly created table and the data entered to it, I asked the question you > are

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-22 Thread Arbol One
Message - > From: Pavel Ivanov > Sent: 06/21/12 01:08 PM > > To: General Discussion of SQLite Database > Subject: Re: [sqlite] C++ > programming - int sqlite3_prepare_v2() question > > > Also, I have > downloaded and installed 'SQLight D esigner' and when opening

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-22 Thread Pavel Ivanov
o: General Discussion of SQLite Database > Subject: Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question > >  > Also, I have downloaded and installed 'SQLight Designer' and when opening > the database file, I have just created, all that I can see is the words: > SQ

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-22 Thread Arbol One
hand, as far as you can see, should the code I have shown open a database, create a table and then add data to the table? Thanks! - Original Message - From: Pavel Ivanov Sent: 06/21/12 01:08 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] C++ programming - int

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-21 Thread Pavel Ivanov
>  Also, I have downloaded and installed 'SQLight Designer' and when opening > the database file, I have just created, all that I can see is the words: > SQLite format 3. Apparently you open your database file in some plain text editor instead of in something that understands what SQLite

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-21 Thread Arbol One
namespace jme { class Runner : public Gtk::Window { private: jme::Exception* e; // Exception handler sqlite3 *db; // Data Base sqlite3_stmt* stmt; // SQL statement Glib::ustring dbName; // db name Glib::ustring sName; // my name Glib::ustring sAddress; // my address Glib::ustring vfs; //

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-19 Thread Igor Tandetnik
Arbol One wrote: > Since the purpose of this exercise is to create a simple table, could you > tell me if this is all I have to do? Are there any > other steps? Well, did it work? You can examine the database file using sqlite3 command line shell, or any of the

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-19 Thread Arbol One
Hi Igor. Since the purpose of this exercise is to create a simple table, could you tell me if this is all I have to do? Are there any other steps? - Original Message - From: Igor Tandetnik Sent: 06/18/12 08:36 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ programming - int

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-18 Thread Igor Tandetnik
Arbol One wrote: > Continuing with the questions and moving to the step three. > int sqlite3_step(sqlite3_stmt*); > --- > rc = sqlite3_step(stmt); > if(rc != SQLITE_DONE) { > sqlite3_close(db); > std::cout << "error sqlite3_step: " << rc << std::endl; > exit(-3); > }

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-18 Thread Arbol One
); std::cout << "error sqlite3_step: " << rc << std::endl; exit(-3); } Any suggestions? - Original Message - From: Igor Tandetnik Sent: 06/17/12 06:41 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question Arbol

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-17 Thread Igor Tandetnik
Arbol One wrote: > //2 . ) create a table > sqlite3_stmt** stmt; Which part of "sqlite3_stmt* stmt;" did you find unclear? > std::string create_table("CREATE TABLE friend (name TEXT, address TEXT, age > INT)"); > rc = sqlite3_prepare_v2( > db, /* Database handle */ >

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-17 Thread Arbol One
d::endl; exit(-1); } however, this gives me a run time error that reads *#0 0x00446642 in ??() (??:??)* What did I do wrong? - Original Message - From: Igor Tandetnik Sent: 06/17/12 05:41 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] C++ programming - int sqlite3_p

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-17 Thread Igor Tandetnik
Arbol One wrote: > rc = sqlite3_open_v2(dbName.c_str(), , SQLITE_OPEN_READWRITE | > SQLITE_OPEN_CREATE, vfs.data()); Just pass NULL for the last parameter. There is very rarely a need to pass anything else. > *//2 . ) create a table > std::string create_table("CREATE

Re: [sqlite] C++ programming - int sqlite3_prepare_v2() question

2012-06-17 Thread Arbol One
int sqlite3_prepare_v2( sqlite3 *db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ ); /***