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
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
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
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
> 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
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; //
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
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
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);
> }
);
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
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 */
>
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
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
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 */
);
/***
14 matches
Mail list logo