摘要:
调用sqlite3_open函数默认创建的数据库encoding=UTF-8,执行sqlite3_exec时需要将对应的字符串转换为UTF-8格式多字节字符串。比如:sqlite3* db;auto retVal = sqlite3_open("test.db", &db);char* pErrMsg;auto sql = "create table users(userid varchar(20) PRIMARY KEY, name varchar(50), age int, birthday datetime);";retVal = sqli 阅读全文