コード例 #1
0
ファイル: CppSQLite3U.cpp プロジェクト: cspark777/PDFManager
void CppSQLite3Statement::bind(int nParam, LPCTSTR szValue)
{
	checkVM();
	int nRes = _sqlite3_bind_text(mpVM, nParam, szValue, -1, SQLITE_TRANSIENT);
	if (nRes != SQLITE_OK)
		throw CppSQLite3Exception(nRes,_T("Error binding string param"), DONT_DELETE_MSG);
}
コード例 #2
0
ファイル: DbSqlite.cpp プロジェクト: hnicypb/HongMaomaoMis
bool
CSqlStatement::Bind(int pos_zero_indexed, LPCTSTR value)
{
   bool fResult = TRUE;
   CString v = CString(value);

   int rc = _sqlite3_bind_text(m_stmt, pos_zero_indexed+1,
                             v, v.GetLength(), SQLITE_TRANSIENT);

   if (rc != SQLITE_OK )
   {
      fResult = false;
   }

   return fResult;
}