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

accessÖÐlikeд·¨

sqlÓï¾äÊÇÕâÑùдµÃ 
string sql = "select * from shophistory where username(stringÀàÐÍ)¡¡like '%"+ name +"%' ";
½á¹ûÔËÐб¨´í£º(²Ù×÷·û¶ªÊ§) ÔÚ²éѯ±í´ïʽ  ˵ºó°ë¶ÎÓдíÎó like '%"+ name +"%' ";

²é¹ýÍøÉÏ×ÊÁÏ ËµÊÇÓÃ* #»ò ?¶¼ÐÐ £¬µ«ÔÚvs2005ÖÐ ÈçÓõÄÊÇOleDbDataAdapter »¹ÊÇÓðٷֺţ¿²»ÖªµÀ¸ÃÈçºÎÐ޸ģ¿ÔÚÏߵȼ±£¡£¡
ÁíÍâÔÙÎÊÒ»ÏÂaccessÖÐ Îı¾ºÍ±¸×¢ 2¸öÊÇ·ñ¶¼ÄÜÓÃlikeÄ£ºý²éѯ£¿ÈçÊÇÓï·¨ÊÇ·ñ¾ÍÊÇÓëÎÒÉÏÃæдµÄÒ»Ñù£¿

*

ºý²éѯÓëbetween and
AccessÓë SqlServer  ,Oracle  ²»Í¬µÄµØ·½
Select * from ±í where  ×Ö¶Î1  like '*aa*'      aaÊÇÄãÊäÈëµÄ×Ö·û  *ÊDZØÐëÊäÈëµÄ¸ñʽ
Select * from ±í where  ×Ö¶Î2  between #3#  and  #33#      ×Ö¶Î2  ÔÚ3ºÍ33Ö®¼ä  #ÊDZØÐëÊäÈëµÄ¸ñʽ

select * from ±íÃû where ×Ö¶ÎÃû like '*abc*'


C# code:

//ʹÓòÎÊý
sql = "SELECT * from tt where aa like '%'+@t1+'%'";



ÒýÓÃ
ºý²éѯÓëbetween and
AccessÓë SqlServer  ,Oracle  ²»Í¬µÄµØ·½
Select * from ±í where  ×Ö¶Î1  like '*aa*'      aaÊÇÄãÊäÈëµÄ×Ö·û  *ÊDZØÐëÊäÈëµÄ¸ñʽ
Select * from ±í where  ×Ö¶Î2  between #3#  and  #33#


Ïà¹ØÎÊ´ð£º

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

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

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

php ʹÓà ADODB Á¬½ÓAccess µÄÎÊÌâ

<?php

include("adodb/adodb.inc.php");

$db = &NewADOConnection("access");
$access = realpath("Data.mdb");
$dsn = "Provider=Microsoft.J ......

ODBC Microsoft accessµÇ¼ʧ°Ü

н¨µ¥Îĵµ³ÌÐòÑ¡ÔñODBCÖеÄÊý¾ÝԴʱ×ÜÊǵ¯³öÒ»¸öµÇ¼´°¿ÚÒªÊÚȨ¡£¡£¡£»¹ÒªÃÜÂë¡£¡£¡£
      ÆäËûµÄµ÷ÓÃODBCÖеÄÊý¾ÝÔ´ÊǾͲ»ÐèÒªÕâ¸ö£¬¿ÉÒÔÔËÐС£
  ŪÁ˺ó¤Ê±¼äÁË¡£¡£¡£
ûÓö¼û¹ý£¬¿ ......

access±íÖÐʱ¼ä²îµÄÉú³É

access±íÖÐÓÐ3¸ö×ֶΣ¬starttime£¬endtime£¬timespan£¬
ÊäÈëÇ°Á½¸öÖµºóÔõô×Ô¶¯Éú³ÉtimespanÄØ
´´½¨²éѯ¡£

select *, endtime-starttime from your table


»òÕßÔÚÄãµÄÊäÈë´°ÌåÖÐÓÃVBA´úÂëʵÏÖ¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ