2013年12月22日

sqlite3_column_text返回NULL

摘要: 1 GoodsRecord goodsRecord;2 goodsRecord.m_strCusName = reinterpret_cast(sqlite3_column_text(pSqliteStmt, 1));3 goodsRecord.m_strInsertTime = reinterpret_cast(sqlite3_column_text(pSqliteStmt, 2));4 goodsRecord.m_strPrintTime = reinterpret_cast(sqlite3_column_text(pSqliteStmt, 3));如果表中第三列printTime值为空, 阅读全文

posted @ 2013-12-22 23:23 翟小祥 阅读(2464) 评论(0) 推荐(0) 编辑

2013年12月14日

sqlite如何判断表是否存在(C++/VC)

摘要: 1 BOOL CDBAccess::IsTableExsit(const char* pTableName) 2 { 3 if (NULL == m_pSqlite3 || NULL == pTableName) 4 { 5 return TRUE; 6 } 7 sqlite3_stmt* pSqliteStmt = NULL; 8 char* pErrMsg = NULL; 9 char chSQL[SQL_MAXLENGTH];10 //这里本来想用绑定的,如select count(*) from sqlite_master where type = 'table' an 阅读全文

posted @ 2013-12-14 23:59 翟小祥 阅读(1908) 评论(0) 推荐(0) 编辑

导航