Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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);


Ïà¹ØÎÊ´ð£º

ASP+ACCESSÊä³öÎÊÌâ - Web ¿ª·¢ / ASP

ÄÄÀï³ö´íÁË£¬Êä³öÕâÑùµÄ½á¹û£¿£¿
<%@ Page Language="VB" AutoEventWireup="false" aspcompat="true" CodeFile="Default.aspx.vb" Inherits="_Default" %&g ......

dwr Illegal access to default constructor´íÎó

dwr.xml:
<create creator="struts" javascript="PrisonerActionForm">
  <param name="formBean" value="prisonerForm"/>
  < ......

VCÖÐ odbc·ÃÎÊaccessÄÚ´æÔö³¤

vcÖÐÓÃodbcµÄ·½·¨·ÃÎÊaccessÊý¾Ý¿â£¬Óõ½ÁËcdatabaseÀàºÍcrecordsetÀà¡£Êý¾ÝÔ´ÔÚ´°¿Ú³õʼ»¯µÄʱºò±»´ò¿ªg_datasource.Open("data",FALSE,FALSE); µã»÷Ò»¸ö°´Å¥Æô¶¯Ò»¸ö¶¨Ê±Æ÷£¬ÔÚ¶¨Ê±Æ÷ÄÚÍê³ÉÒÔϲÙ×÷£¬¶¨ ......

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ºÅ