sqlite 使用


sqlite3* sql = NULL;
	char* err;
	int info = sqlite3_open(tableName, &sql);
	if (info != SQLITE_OK)
	{
		sqlite3_close(sql);
		return;
	}
	char* comment	=	"create table if not exists userData(ID integer primary key autoincrement,name integer,age char[1024],money integer)";
	sqlite3_exec(sql,comment,NULL,NULL,&err);

	comment =  "insert into userData(name,age,money) values('ed','11','222222')";
	sqlite3_exec(sql,comment,NULL,NULL,&err);



你可能感兴趣的:(sqlite 使用)