X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fdb%2Fsqlite3statement.cpp;h=538ed0663171677ba4aee5d0d74f6d17277e1031;hb=5f8a87e41beeda971d6a47a6c6b0555da00af978;hp=54c26fedb9f3cf9d0afa0908c251cb77bf254301;hpb=c7fcb4c4bc5012a584add81a9509fc1f84c3c688;p=fms.git diff --git a/src/db/sqlite3statement.cpp b/src/db/sqlite3statement.cpp index 54c26fe..538ed06 100644 --- a/src/db/sqlite3statement.cpp +++ b/src/db/sqlite3statement.cpp @@ -44,6 +44,7 @@ Statement::~Statement() Finalize(); + /* std::vector::iterator i; for(i=textptrs.begin(); i!=textptrs.end(); i++) { @@ -52,6 +53,7 @@ Statement::~Statement() delete [] (*i); } } + */ } const bool Statement::Bind(const int column) @@ -121,13 +123,16 @@ const bool Statement::Bind(const int column, const std::string &value) { if(Valid() && column>=0 && column g(DB::instance()->m_mutex); PThread::Guard g(DB::Instance()->m_mutex); - if(sqlite3_bind_text(m_statement,column+1,text,value.size(),NULL)==SQLITE_OK) + m_boundtext.push_back(std::vector(value.begin(),value.end())); + //if(sqlite3_bind_text(m_statement,column+1,text,value.size(),NULL)==SQLITE_OK) + if(sqlite3_bind_text(m_statement,column+1,&m_boundtext[m_boundtext.size()-1][0],m_boundtext[m_boundtext.size()-1].size(),NULL)==SQLITE_OK) { return true; }