Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQLite C/C++½Ó¿Ú½éÉÜ

ÕâƪÎÄÕÂÊÇʹÓÃSQLite C/C++½Ó¿ÚµÄÒ»¸ö¸ÅÒª½éÉܺÍÈëÃÅÖ¸ÄÏ¡£
ÓÉÓÚÔçÆÚµÄSQLiteÖ»Ö§³Ö5¸öC/C++½Ó¿Ú£¬Òò¶ø·Ç³£ÈÝÒ×ѧϰºÍʹÓ㬵«ÊÇËæ×ÅSQLite¹¦ÄܵÄÔöÇ¿£¬ÐµÄC/C++½Ó¿Ú²»¶ÏµÄÔö¼Ó½øÀ´£¬µ½ÏÖÔÚÓг¬¹ý150¸ö²»Í¬µÄAPI½Ó¿Ú¡£ÕâÍùÍùʹ³õѧÕßÍû¶øÈ´²½¡£ÐÒÔ˵ÄÊÇ£¬´ó¶àÊýSQLiteÖеÄC/C++½Ó¿ÚÊÇרÓõģ¬Òò¶øºÜÉÙ±»Ê¹Óõ½¡£¾¡¹ÜÓÐÕâô¶àµÄµ÷Óýӿڣ¬ºËÐĵÄAPIÈÔÈ»Ïà¶Ô¼òµ¥ºÍ±ãÓÚµ÷Óᣱ¾Æ¬ÎÄÕµÄÄ¿µÄ¾ÍÊÇΪÁËÄܹ»¸üÒ×ÓÚÀí½âSQLiteµÄÔË×÷Ìṩ»ù´¡µÄ֪ʶ¡£
Áíһƪ¶ÀÁ¢µÄÎĵµ¡¶The SQLite C/C++ Interface¡·¶ÔSQLiteÖеÄËùÓÐC/C++½Ó¿ÚÌṩÁËÏêϸµÄʹÓÃ˵Ã÷¡£Ò»µ©¶ÁÕßÀí½âÁËSQLiteµÄ»ù±¾²Ù×÷Ô­Àí£¬ÕâƪÎĵµ¾ÍÓ¦µ±×÷Ϊһ±¾²Î¿¼Êֲᡣ±¾ÆªÎÄÕ½ö½öÊÇSQLiteµÄÒ»¸öÈëÃŽéÉÜ£¬¶ø²»ÊÇÍêÕûºÍȨÍþÐÔµÄSQLite API²Î¿¼Ö¸ÄÏ¡£
1.0 ºËÐĶÔÏóºÍ½Ó¿Ú
SQLÊý¾Ý¿âÒýÇæµÄ×îÖ÷ÒªÈÎÎñÊǽâÎöSQLÓï¾ä¡£ÎªÁË´ï³ÉÕâ¸öÄ¿µÄ£¬¿ª·¢ÕßÐèÒªÁ˽âÁ½¸ö¶ÔÏó£º
* Êý¾Ý¿âÁ¬½Ó¶ÔÏó£ºsqlite3
* Ô¤´¦ÀíÓï¾ä¶ÔÏó£ºsqlite3_stmt
ÑϸñÀ´½²£¬Ô¤´¦ÀíÓï¾ä¶ÔÏó²¢²»ÊDZØÐëµÄ£¬ÒòΪÄܹ»Ê¹ÓÃsqlite_exec»òÕßsqlite3_get_tableÕâЩ±ãÓÚʹÓõķâ×°½Ó¿Ú£¬¶øÕâЩ½Ó¿Ú·â×°²¢Òþ²ØÁËÔ¤´¦ÀíÓï¾ä¶ÔÏó¡£¾¡¹ÜÈç´Ë£¬¶ÔÔ¤´¦Àí¶ÔÏóµÄÀí½âÓÐÖúÓÚÎÒÃǸü³ä·ÖµÄʹÓÃSQLite¡£
Êý¾Ý¿âÁ¬½Ó¶ÔÏóºÍÔ¤´¦Àí¶ÔÏóÊÇÓÉÏÂÁеÄÒ»×éC/C++½Ó¿Úµ÷ÓòÙ×ݵģº
* sqlite3_open()
* sqlite3_prepare()
* sqlite3_step()
* sqlite3_column()
* sqlite3_finalize()
* sqlite3_close()
Õâ6¸öC/C++½Ó¿ÚÀý³ÌºÍÉÏÊöµÄÁ½¸ö¶ÔÏó¹¹³ÉÁËSQLiteµÄºËÐŦÄÜ¡£¿ª·¢Õ߶ÔÓÚËüÃǵÄÀí½âÄܹ»¸üºÃµÄʹÓÃSQLite¡£
×¢Ò⣬Õâ¸ö½Ó¿ÚÀý³ÌÁбí¸ü¶àÊǸÅÄîÉϵÄÒâÒå¶ø²»ÊÇʵ¼ÊµÄ½Ó¿Ú¡£Ðí¶àÕâЩ½Ó¿Ú¶¼³öÏÖÔÚ¸÷¸ö°æ±¾Ö®ÖС£ÀýÈ磬ÉÏÊöÁбíÖеÄsqlite3_open()Àý³Ìʵ¼ÊÉÏÓÐÈý¸ö²»Í¬µÄ½Ó¿ÚÒÔÂÔ΢²»Í¬µÄ·½Ê½ÊµÏÖÏàͬµÄ¹¦ÄÜ£ºslqite3_open()£¬sqlite3_open16()ºÍsqlite3_open_v2()¡£ÁбíÖеÄʵ¼ÊÉϲ¢²»´æÔÚsqlite3_column()Õâ¸ö½Ó¿Ú¡£ÏÔʾÔÚÁбíÖеēsqlite3_column()”½ö½öÊÇÒ»¸öռ룬±íʾһÕûÌ×ÓÃÓÚ´Ó±íÖвéѯ³ö¸÷ÖÖÊý¾ÝÀàÐ͵ÄÁмǼ½Ó¿Ú¡£
ÕâÀï˵Ã÷ϺËÐĽӿڵÄÖ÷Òª¹¦ÄÜ£º
* sqlite3_open() ¸Ã½Ó¿Ú´ò¿ªÓëÒ»¸öSQLiteÊý¾Ý¿âÎļþµÄÁ¬½Ó²¢·µ»ØÒ»¸öÊý¾Ý¿âÁ¬½Ó¶ÔÏó¡£Õâͨ³£ÊÇÓ¦ÓóÌÐòµ÷ÓõĵÚÒ»¸öSQLite API½Ó¿Ú¶øÇÒÒ²Êǵ÷ÓÃÆäËûSQLite API½Ó¿ÚÇ°ÐèÒªµ÷ÓõĽӿڡ£Ðí¶àSQLite½Ó¿ÚÐèÒªÒ»¸öÖ¸ÏòÊý¾Ý¿âÁ¬½Ó¶ÔÏóµÄÖ¸Õë×÷ΪËüÃǵĵÚÒ»¸ö²ÎÊý£¬Òò¶øÕâЩ½Ó¿ÚÒ²¿ÉÒÔÀí½â³ÉÊÇÊý


Ïà¹ØÎĵµ£º

sqliteÈ«ÎIJéѯÅäÖõ½Ê¹ÓÃÈ«¹ý³Ì

      SQLiteÊÇÒ»¿îÇáÐ͵ÄÊý¾Ý¿â£¬ÊÇ×ñÊØACIDµÄ¹ØÁªÊ½Êý¾Ý¿â¹ÜÀíϵͳ£¬ËüµÄÉè¼ÆÄ¿±êÊÇǶÈëʽµÄ£¬¶øÇÒÄ¿Ç°ÒѾ­ÔںܶàǶÈëʽ²úÆ·ÖÐʹÓÃÁËËü£¬ËüÕ¼ÓÃ×ÊÔ´·Ç³£µÄµÍ£¬ÔÚǶÈëʽÉ豸ÖУ¬¿ÉÄÜÖ»ÐèÒª¼¸°ÙKµÄÄÚ´æ¾Í¹»ÁË¡£ËüÄܹ»Ö§³ÖWindows/Linux/UnixµÈµÈÖ÷Á÷µÄ²Ù×÷ϵͳ£¬Í¬Ê±Äܹ»¸úºÜ¶à³ÌÐòÓïÑÔÏà½áºÏ£¬±È ......

sqliteÈ«ÎIJéѯÅäÖõ½Ê¹ÓÃÈ«¹ý³Ì

      SQLiteÊÇÒ»¿îÇáÐ͵ÄÊý¾Ý¿â£¬ÊÇ×ñÊØACIDµÄ¹ØÁªÊ½Êý¾Ý¿â¹ÜÀíϵͳ£¬ËüµÄÉè¼ÆÄ¿±êÊÇǶÈëʽµÄ£¬¶øÇÒÄ¿Ç°ÒѾ­ÔںܶàǶÈëʽ²úÆ·ÖÐʹÓÃÁËËü£¬ËüÕ¼ÓÃ×ÊÔ´·Ç³£µÄµÍ£¬ÔÚǶÈëʽÉ豸ÖУ¬¿ÉÄÜÖ»ÐèÒª¼¸°ÙKµÄÄÚ´æ¾Í¹»ÁË¡£ËüÄܹ»Ö§³ÖWindows/Linux/UnixµÈµÈÖ÷Á÷µÄ²Ù×÷ϵͳ£¬Í¬Ê±Äܹ»¸úºÜ¶à³ÌÐòÓïÑÔÏà½áºÏ£¬±È ......

SQLite ÖÐÎÄ FAQ

zz from https://www.dream4ever.org/showthread.php?t=86440 feuvan @ DRL
Ô­ÎÄÔÚhttp://sqlitecn.feuvan.net/faq.html
Óï·¨²¿·ÖÕýÔÚ·­ÒëÖУ¬¾´ÇëÆÚ´ý
FAQÖÐÎÄ°æ
ÈçºÎ´´½¨×ÔÔö×ֶΣ¿
SQLite Ö§³ÖÄÄЩÊý¾ÝÀàÐÍ£¿
ΪʲôÄÜÏò SQLite Êý¾Ý¿âµÄÕûÐÍ×Ö¶ÎÖвåÈë×Ö·û´®£¿
Ϊʲô SQLite ÈÏΪ±í´ïʽ '0'=='00' ΪÕ棿 ......

C#ÓëSqliteÊý¾Ý¿â²Ù×÷ʵÀý

ÕâÊÇÒ»¸öÓйطÖÒ³µÄʵÀý,½ö¹©²Î¿¼(´úÂëÀ´×ÔÍøÂç)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SQLite;
using System.Threading;
using System.Collections;
us ......

sqlite´úÂëµÄ±àд

 ÏÂÔØ´úÂë
È¡µÃÒ»·Ý¶þ½øÖÆ¿½±´, »òÕßÊÇÔ´´úÂë²¢×Ô¼º±àÒëËü. ¹ØÓÚ ÏÂÔØÒ³£¨download£© µÄ¸ü¶àÐÅÏ¢.
´´½¨Ò»¸öÐÂÊý¾Ý¿â
ÔÚ DOS ÃüÁîÐÐÏÂ, ÊäÈë: "sqlite3 test.db". ½«´´½¨Ò»¸öеÄÊý¾Ý¿âÎļþÃû½Ð"test.db". (Äã¿ÉÒÔʹÓò»Í¬µÄÃû×Ö)
ÊäÈë SQL ÃüÁîÔÚÌáʾ·ûÏ´´½¨ºÍдÈëеÄÊý¾Ý.
д³ÌÐòʹÓà SQLite
ÏÂÃæÊÇÒ»¸ö¼òµ¥µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ