Update of /cvsroot/gcblue/gcb_wx/src/sqlite
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10630/src/sqlite
Modified Files:
sqlite3x_reader.cpp
Log Message:
vc8 updates
Index: sqlite3x_reader.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/sqlite/sqlite3x_reader.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sqlite3x_reader.cpp 16 Sep 2005 21:58:05 -0000 1.1
--- sqlite3x_reader.cpp 23 Mar 2006 01:11:02 -0000 1.2
***************
*** 109,113 ****
if(!this->cmd) throw database_error("reader is closed");
if((index)>(this->cmd->argc-1)) throw std::out_of_range("index out of range");
! return std::string((const char*)sqlite3_column_text(this->cmd->stmt, index), sqlite3_column_bytes(this->cmd->stmt, index));
}
--- 109,123 ----
if(!this->cmd) throw database_error("reader is closed");
if((index)>(this->cmd->argc-1)) throw std::out_of_range("index out of range");
!
! const char* s = (const char*)sqlite3_column_text(this->cmd->stmt, index); //, sqlite3_column_bytes(this->cmd->stmt, index));
! if (s != 0)
! {
! return std::string(s);
! }
! else
! {
! fprintf(stderr, "(Known bug)sqlite3_reader::getstring -- Bad column index (%d)\n", index);
! return std::string("");
! }
}
|