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

ÔÚÒ»ÕÅaccess±íÖÐǶÌײéѯ

strSQLCmd.Format(_T("select * from (select * from talk_info where %s ='%s') where %s ='%s'"),
strVar,strValue,strVar2,strValue2);
ÇëÎÊÕâÓï¾äÓÐÎÊÌâÂð
ûÓÐÎÊÌâ¡£

½¨ÒéÄãͨ¹ýµ÷ÊÔ°ÑÕâ¸ö  ("select * from (select * from talk_info where %s ='%s') where %s ='%s'"),strVar,strValue,strVar2,strValue2)
Êä³ö¿´Ò»Ï½á¹ûÊÇʲô£¿ ¹À¼ÆÄãµÄ±äÁ¿ÓÐÎÊÌâ¡£

strSQLCmdÄÚÈÝÊÇʲô

CString strSQLCmd;
ÊDz»ÊDZäÁ¿µÄÖµ´ú½øÈ¥ÊÇÕâÖÐÐÎʽ°¡£ºstrSQLCmd.Format(_T("select * from (select * from talk_info where strVar ='strValue') where strVar2 ='strValue2'")£»



Ïà¹ØÎÊ´ð£º

aspÖÐaccess¶à±í²éѯµÄÎÊÌâ¼±£¡

ÎÒÏëÔÚaspÖУ¬ÊµÏÖ°Ñ£¬±í1,±í2£¬±í3£¬Öеö×ֶΣ¬²éѯ³öÀ´£¬¾ÍÊÇÈý¸ö±íÁªºÏ²éѯ£¨ÎÒÓõÄʱºòÁ½¸ö±íÁªºÏ²éѯûÓÐÎÊÌ⣬µ«ÊǾÍÊDz»ÄÜÈý¸ö±íÁªºÏ²éѯ£©£¬
ÆäÖУ¬±í2µÄ£¬mainid,×ֶκͱí1µÄid×Ö¶ÎÏà¹Ø£¬±í2µÄid×Ö¶ ......

asp¸úAccessÊý¾ÝÁ¬½ÓÎÊÌâ¡£

IsSqlDataBase = 0 'Ö÷Êý¾Ý¿âÀàÐÍ(1=SQL£¬0=AC)

'===========================================================================
SqlDatabaseName = "ads365" 'Ö÷Êý¾Ý¿âÃû
S ......

access Êý¾Ý¿â SQLÓï¾äÔõôÑùËæ»úÑ¡ÔñÊý¾Ý£¿£¿

³ÌÐòʱASP+access

sql="select top 2 id,username from comp    order by rnd(id)  "

ÉÏÃæÓï¾äˢкó¶¼ÊÇÒ»¸öÖµ ÕâÑù»¹ÓÐËæ»úµÄÒâÒåÂð

ACCESSÓÐË¢ÐÂËæ»úÑ¡ÔñµÄSQLÓ ......

ÓÃVBÇóACCESSÁ½¸ö±íµÄºÍ

ÓÃVBÇóACCESSÁ½¸ö±íµÄºÍ

a±íÀïÓÐ
ID Ãû³Æ ÊýÁ¿ ×ܼÛ
1  a    13  11
2  c    20  20
3  c    2    52
4  b&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ