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

dOOdads Á¬½Ó ACCESS µÄÊý¾Ý·ÖÒ³ÎÊÌâ

ÈçÌâ dOOdads Á¬½Ó ACCESS µÄÊý¾Ý·ÖÒ³ÎÊÌ⣡

ʹÓà dOOdads Á¬½Ó ACCESSÊý¾ÝµÄʱºò Êý¾Ý·ÖÒ³µÄÎÊÌ⣡
¸ù¾ÝÕâ¸ö¸Ä°É
C# code:

public static Product[] SearchProducts(string keyword, int categoryID, int pageSize, int pageIndex, out int total)
{
OleDbConnection connection = new OleDbConnection(ConnectionString);
// ½¨Á¢²éѯ£¬²é³öÂú×ãÌõ¼þ²úÆ·µÄ×ÜÊý
OleDbCommand countCommand = connection.CreateCommand();
countCommand.CommandText = "SELECT COUNT(ProductID) from tblProducts ";

string where = "WHERE Active > 0 ";
if (categoryID > 0)
{
where = where + "AND CategoryID = " + categoryID.ToString() + " ";
}

if (!string.IsNullOrEmpty(keyword))
{
where = where + "AND ProductName LIKE '%" + keyword + "%' ";
}
countCommand.CommandText += where;

DataTable dt = new DataTable();
try
{
connection.Open();
total = (int)countCommand.ExecuteScalar();

if (total < 1) return null; // ûÓмǼ·µ»Ø¿Õ£¨null£©

int maxPageNum = (total % pageSize == 0 ? total / pageSize : total / pageSize + 1);


Ïà¹ØÎÊ´ð£º

ÈçºÎ´ÓACCESSÊý¾Ý¿âÖÐÒ»´Î²éѯ¶à¸ö±í²¢¼ÓÈëÊý¾Ý¼¯?

ÔÚMSSQLÖУ¬ÎÒÃÇ¿ÉÒÔÒ»´Î²éѯ¶à¸öÊý¾Ý±í²¢¼ÓÈëµ½Êý¾Ý¼¯ÖУ¬ÖмäÖ»ÐèÓ÷ֺŸô¿ª£®È磺
£¢select * from A;select * from B;select * from C£¢,Ìî³äÊý¾Ý¼¯ºóÔÚDSÖоÍÓÐÁËÈýÕÅ±í£®
µ«ÔÚÓÃͬÑùµÄÓï¾ä·ÃÎÊACCESSÊý¾ ......

aspÁ¬½ÓACCESSÊý¾Ý¿âµÄÎÊÌ⣡£¡

×î½üѧϰasp£¬µ±Á·Ï°µ½Á¬½ÓÊý¾Ý¿âµÄʱºò£¬ÆµÆµ³ö´í£¬¿É¾ÍÊDz»ÖªµÀ´íÔÚÔõôµØ·½£¬Çë¸ßÊÖ°ïæ¿´¿´£¡£¡Ð»Ð»£¡
°üº¬Îļþxx.asp¡¢xxsave.asp¡¢conn.aspÒÔ¼°student1.mdbºÍ±íxxgl¡­¡­
xx.aspΪ£º
<html>
<hea ......

accessÖеÄtextÐÍÊý×Ö - ÆäËûÊý¾Ý¿â¿ª·¢ / Access

accessÖеÄtextÐ͵ÄÊý×Ö£¬Ôõô±È½Ï´óС°¡£¿
´ó¼ÒÖªµÀÂð?
ÒòΪÎÒÏë¸ù¾ÝÕâÒ»ÁÐÊý¾ÝµÄ´óС²éѯһЩ¶«Î÷
¾Ù¸öÀý×Ó£º
¾ÍÊÇ£¬ÎÒÓÐÒ»ÁÐÊý¾ÝΪ±àÂ룺
ÊÇtextÐ͵ÄÊý×Ö£ºÈç
1101
1102
1103
µÈ£¬
ÎÒÏÖÔÚҪȡ³ö±àÂë±È ......

access Á¬¸ö±í°´¶à×Ö¶Î ×óÓÒÁ¬½ÓµÄÎÊÌâ

accessÖÐÈçºÎÁ½¸ö±í °´Á½¸ö×ֶνøÐÐ×óÁ¬½Ó
±ÈÈç ÓÐÁ½¸ö±í·Ö±ðΪ
t1
id, lb1 ,value1
1 201 1
2 202 1
2 202 1.5
±í2£ºt2
id ,lb2 ,value2
1 201 2.5
ÎÒÏëÁ½¸ö±íÁ¬½Ó£¬°´ id£¬lbÁ½¸ö×ֶΰ´t1Á ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ