Windows MobileÏ·ÃÎÊSqliteµÄNative C++·â×°
±³¾°
µ±Ç°Òƶ¯É豸¿ª·¢ÁìÓò£¬ÔÚ±¾µØÊý¾Ý´æ´¢·½Ã棬Sqlite¼¸ºõ³ÉÁËÊÂʵ±ê×¼£¬Andriod (android.database.sqlite)£¬iPhone (SQLite for iPhone SDK ºÍ FMDB for iPhone)£¬Palm WebOS (webOS SQL Tutorial)£¬Ð°汾µÄSymbianÒ²Ö±½Óbuilt-in SqliteÁË(20 million Symbian smartphones shipped in Q3 2007 Newer versions of the SymbianOS have SQLite built in.)¡£ÄÇô×÷ΪÒƶ¯É豸ÁìÓòµÄÖØÒªÒ»Ô±Windows MobileÔõô¿ÉÄÜ´í¹ýSqliteÄØ¡£
¼ò½é
Sqlite¼¸ºõ³ÉÁ¢Òƶ¯É豸¿ª·¢ÁìÓòÊý¾Ý´æ´¢·½ÃæµÄÊÂʵ±ê×¼¡£SqliteÒѾ¹ã·º±»Ê¹Óõ½Andriod£¬iPhone£¬WebOSÒÔ¼°SymbianµÈƽ̨ÁË£¬±¾ÎĽ²ÊöÔÚWindows Mobileƽ̨ÏÂÈçºÎʹÓÃNative C++·ÃÎÊSqlite£¬Í¬Ê±½²ÊöÒ»¸ö·â×°ÀàµÄʵÏÖºÍʹÓá£
SqliteÔ´Âë
SqliteÔ´Âë¿ÉÒÔµ½ SQLite Download Page ÏÂÔØ£¬ÎÒΪÁËÊ¡ÊÂÖ±½ÓʹÓÃÁËsqlite.phxsoftware.comµÄÔÚWindows MobileϵÄbuild¹¤³Ì¡£
SqliteµÄC++·â×°
·â×°ÎÒʹÓÃÁËTyushkov NikolayµÄ·â×°CppSQLite3U¡£ÕâÀï¸ÐлegmkangµÄÍƼö¡£CppSQLite3U·â×°ÊǶÔSqliteÔÓд¿CµÄapi½øÐÐOOµÄC++µÄ·â×°¡£Ö÷Òª·â×°ÒÔϼ¸¸öÀࣺ
1. CppSQLite3DB Êý¾Ý¿âÀ࣬ÓÃÓÚн¨Êý¾Ý¿â£¬´ò¿ª¹Ø±ÕÁ´½Ó£¬Ö´ÐÐDDLºÍDML¡£
2. CppSQLite3Statement ÓÃÓÚÖ´ÐвÎÊý»¯µÄSQL¡£CppSQLite3DB ¿ÉÒÔÖ´ÐÐSQLµ«ÊDz»Ö§³Ö²ÎÊý»¯¡£
3. CppSQLite3Query ÓÃÓÚ¶Á³öÖ´ÐÐSelectºóµÄ²éѯ½á¹û¡£
4. CppSQLite3Exception ÓÃÓÚ²¶×½Òì³£¡£
¼òµ¥Ã÷Á˵ķâ×°ÁËSqlite¡£
·â×°ÀàµÄʹÓÃ
ʹÓ÷½·¨Ô´×ÔÓÚÎÒ¶ÔCppSQLite3UÀàµÄµ¥Ôª²âÊÔ¡£¼ûÔ´ÎļþµÄSqliteHelperTest.h¡£
´´½¨Êý¾Ý¿âÎļþ
TEST(SqliteHelper, CreateDatabase){ try { CppSQLite3DB db; DeleteFile(DB_FILE_NAME); db.open(DB_FILE_NAME); db.close(); } catch(CppSQLite3Exception e) { FAIL(ToString(e.errorMessage()).c_str()); } TRACE("Create database successful.");}µ÷ÓÃCppSQLite3DB µÄopen()º¯ÊýµÄʱºòÈç¹û·¢ÏÖûÓÐÊý¾Ý¿âÎļþ¾Í»áн¨Ò»¸öÊý¾Ý¿âÎļþ¡£SqliteµÄÔ´´úÂëÈçÏÂ(¼ûsqlite3.c)£º
rc = ope
Ïà¹ØÎĵµ£º
//1.JavaÖÐ×Ö·û´®²»ÄܶàÐÐÊéд¡£¶àÐÐÊéдÓÃÒýºÅ¸ô¶Ï£¬¼ÓºÅÏàÁ¬¡£
//2.JavaµÄ±êʶ·û¿ÉÒÔÓÃÃÀÔª·ûºÅ¿ªÍ·¡£
//3.JavaÖÐûÓÐÎÞ·ûºÅ±äÁ¿»òÎÞ·ûºÅ³£Á¿µÄ¸ÅÄî¡£ËùÓеıäÁ¿¶¼ÊÇÓзûºÅµÄ¡£
//4.JavaÖбäÁ¿µÄ×Ö³¤Êǹ̶¨µÄ¡£²»´æÔÚcharºÍwcharÖ®·Ö¡£
//5.JavaÖбäÁ¿Î ......
CÊý×éµÄСÎÊÌâ
ÕâÀï˵µÄ¶¯Ì¬Êý×éÊÇ¿ÉÒÔ¸ù¾ÝÐèÒª¶¯Ì¬Ôö³¤Õ¼ÓÃÄÚ´æµÄÊý×飬±ÈÈç³ÌÐò³õʼ·ÖÅäÁË100¸öÔªËØ£¬¿ÉÊÇÔËÐÐÁËÒ»¶Îʱ¼äºóÇøÇø100¸ö¿Õ¼ä²»ÄÜÂú×ãÁË£¬ÏÖÔÚÐèÒª400¸ö£¬Ôõô°ìÄØ£»Äǿ϶¨ÐèÒªÔÙ¶îÍâ·ÖÅä300¸ö¡£
CÓïÑÔÓÐrealloc()º¯ÊýÀ´½â¾ö¿Õ¼äÀ©³äµÄÎÊÌ⣬µ«ÊDz»ÒªÍ ......
µÚÒ»Ì⣺
ÏÂÃæ³ÌÐòµÄÊä³ö½á¹û£¿
#include <stdio.h>
#include <iostream>
void main()
{
char str1[] = "";
char str2[] = "";
const char str3[] = "abc";
const char str4[] = "abc";
const char* str5 = "abc";
const char* str6 = "a ......
±¾ÆªÎÄÕÂÀ´Ô´ÓÚ£º¿ª·¢Ñ§Ôº http://edu.codepub.com ÔÎÄÁ´½Ó£ºhttp://edu.codepub.com/2009/0825/14358.php
SQLiteÊǸöµäÐ͵ÄǶÈëʽDBMS£¬ËüÓкܶàÓŵ㣬ËüÊÇÇáÁ¿¼¶µÄ£¬ÔÚ±àÒëÖ®ºóºÜС£¬ÆäÖÐÒ»¸öÔÒò¾ÍÊÇÔÚ²éѯÓÅ»¯·½Ãæ±È½Ï¼òµ¥£¬ËüÖ»ÊÇÔËÓÃË÷Òý»úÖÆÀ´½øÐÐÓÅ»¯µÄ£¬¾¹ý¶ÔSQLiteµÄ²éѯÓÅ»¯µÄ·ÖÎöÒÔ¼°¶ÔÔ´´úÂëµÄ ......
¡¡¡¡ÓÃC++²Ù×÷MySQLÊý¾Ý¿âÀࣺ
¡¡¡¡×¢ÊÍ£ºÕ⼸¸öÀà¶Ô´¦Àí²»ÊǺܴóÊý¾ÝÁ¿µÄ²Ù×÷ÊǺÜÀíÏëµÄ£¬ µ«²»ÊÊÒËÌØ´óÐ͵ÄÊý¾ÝµÄ²éѯ£¬ÒòΪԴÂëÖн«²éѯµ½µÄÊý¾ÝÖ±½Ó·ÅÈëÁËÄÚ´æ¡£
¡¡¡¡/*
¡¡¡¡* project:
¡¡¡¡* ͨÓÃÄ£¿é ( Óà c++ ´¦Àí mysql Êý¾Ý¿âÀ࣬ÏñADO )
¡¡¡¡*
¡¡¡¡* description:
¡¡¡¡*
¡¡¡¡* ͨ¹ýDataBase,Reco ......