Hi list!

Maybe someone could help me with a little problem. I am trying to update 
an existing entry in the db
with an update statement where one of the columns is a blob type. I have 
code that looks like this:

     sqlite3_stmt* m_pStatement = NULL;

     std::string strStatement( "UPDATE persistence SET 
name=\"blub\",expiration=\"2011-04-02\",value=\"?\" WHERE id=\"1\"" );

     int iResult = sqlite3_prepare_v2( m_pHandle, strStatement.c_str(), 
strStatement.length() + 1, &m_pStatement, NULL );

     /* error checking is done here */

!! the error is on the following line. Whatever I enter for the index 
counter variable, I always get the error: "bind or column index out of 
range"

     iResult = sqlite3_bind_blob( m_pStatement, 0, p_bsValue.data(), 
p_bsValue.length(), SQLITE_TRANSIENT );

     /* here again error checking */

     iResult = sqlite3_step( m_pStatement );

     /* here again error checking */

     //dh done
     sqlite3_finalize( m_pStatement );

Maybe someone could give me a hint?

Regards
Dietmar
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to