accessÖÐlike¸ÃÔõôÓã¿
RT,
ʹÓÃADODB·ÃÎÊAccessµÄÊý¾Ý±í£¬Ñ¡³ö°üº¬×Ö´®abcµÄ¼Ç¼
select * from MyTable where Field1 like ...
likeºóÃæ¸ÃÔõôд£¿
ËƺõaccessÖеÄSQLÊÓͼÄÇÄܹ»Ö´ÐУ¬¶ø°³Ê¹ÓÃADODBÁ¬½ÓºóÖ´ÐÐÈ´²»ÐС£¡£
ÍøÉϲé,likeµÄÓï·¨ËƺõÓкöàºÃ¶à¡£¡£²»ÖªµÀ¸Ã´ÓÄÄÀïÕÒ¡£¡£
SQLServerºÍAccessÓÐɶÇø±ð£¿SQLÓÖÊÇʲô£¿ºÃÏóSQLÓÃÔÚ²»Í¬µÄÊý¾Ý¿âд·¨¶¼²îºÃ¶à¡£¡£¡£
Nz()ÊÇAccessÖеĺ¯Êý£¬¶øÓÃADODB·ÃÎÊʱֻÄÜÓÃiif(),isnull()Ö®Àà´úÌæ¡£¡£¸Ð¾õºÃ»ìÂÒ¡£¡£
×îºóÒ»¸öÎÊÌ⣬ҪѧÊý¾Ý¿â·½ÃæµÄ¶«Î÷£¬¸ÃÔõô×ÅÊÖ£¿ÓÐûÀàËÆMSDNµÄ¶«Î÷¿ÉÒԲ飿¸Ã´ÓÄÄÀï¿´Æð£¿
È«²¿·Ö¶¼¸øÁË£¬Ö»Çó¸øµãÌáʾ¡£
ACCESSµÄ°ïÖúÖÐÓÐJET-SQLµÄÓï·¨½éÉÜ¡£ ÿÖÖÊý¾Ý¿â¶¼²»Ì«Ò»Ñù£¬½¨ÒéÄã¿´°ïÖú¡£
Çø±ðÌ«¶àÁË£¬¿ÉÒÔдÉϼ¸Ç§×Ö¡£½¨ÒéÄãÖ±½ÓÔÚGOOGLEËÑË÷һϡ£
SQL Äã¿ÉÒÔÔÚGOOGLEËÑË÷һϣ¬½á¹¹»¯²éѯÓïÑÔ¡£°Ù¶ÈÖÐÒ²Ò»Ñù¡£»òÕßά»ù¡£
ºÃÏóSQLÓÃÔÚ²»Í¬µÄÊý¾Ý¿âд·¨¶¼²îºÃ¶à , ÊÇµÄ ²»Í¬³§¼Ò¶ÔSQL 92/2002 µÄ±ê×¼Àí½âµÃ²¢²»Ò»Ñù£¬²¢ÇÒ¶¼Ï²»¶¼ÓÈëһЩ×Ô¼ºµÄ¶«Î÷±ÈÈ纯Êý¡£ËùÒÔÄãÒª¿´¸÷×ÔµÄÎĵµ¡£
ODBC±êÁ¿º¯Êý¡£
Ïà¹ØÎÊ´ð£º
_RecordsetPtr CMyAdo::SelectRecord(string &where, string &tablename,string &field, int way )
{
int ret = 0;
_RecordsetPtr pset;
CString sql;
& ......
ÎÒÓÃAccessÊý¾Ý¿â×öÁËÒ»¸öͼÊéÊý¾Ý¿â£¬ÀïÃæÓÐÒ»¸ö×Ö¶ÎÊÇISBN£¬¾ÍÊÇISBNºÅ£¬µ«ÊÇÖ»µÄÒ»×Ü·ÖͼÊéдµÄISBNºÅ£¬ÓеÄûд£¬Ð´µÄÄÇÒ»²¿·ÖÓеÄISBNÊÇÖظ´µÄ£¬ÄÜ·ñÓÃSQLÓïÑÔ°ÑÖظ´µÄ¹ýÂ˵ô£¬µ«Ã»Ð´ISBNºÅµÄͼÊé²»ÄܹýÂ˵ô£¬È ......
Òª×éºÏ4ÕűíµÄ²éѯ£¬·Ö±ðÊÇA±í£¬B±í£¬C±í£¬D±í£»
A±í
Game_id Game_Name
1 abc
B±í
Category_ID Category_Name Game_id
& ......
±¾ÈË×î½üÔÚѧϰvc£¬¶Ôvc²Ù×÷Êý¾Ý¿â»¹ºÜÃԻ󣬲»ÖªµÀÄÄλÄÜ˵ÏÂvcÀïÔõôÑùÁ´½ÓÊý¾Ý¿âµÄ£¬sql server»òaccess¶¼¿ÉÒÔ£¬×îºÃÓиöÀý×Ó¿ÉÒԲο¼Ï¡£ÏÈлл¸÷λ
ADOÀ´·ÃÎÊ ºÜ·½±ãµÄ£¬ÍøÉϺܶàÀý×Ó
VC ADO
htt ......
±¾µØµ÷ÓÃÁËÒ»¸öaccess£¬ÔÚÎÒ»úÆ÷ÉϲâÊÔûÎÊÌ⣬µ«ÊǷŵ½Ó¢ÎĵÄxpÉϾͳö¡°unspecified error¡±´íÎó¡£´úÂë´óÌåÈçÏ£º
g_pConnection->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=CenterServe ......