ASP调用Access带参数的“存储过程”

Access没有存储过程,但我们可以使用查询来实现相同的功能,废话少说,上代码

tbArticleCross =>

PARAMETERS seldate DateTime;  TRANSFORM Count(tbArticle.ArticleID) AS ArticleID之计算  SELECT tbArticle.Summary  FROM tbArticle  WHERE (((DateDiff("m",tbArticle!PublishTime,seldate))=0))  GROUP BY tbArticle.Summary  PIVOT tbArticle.TitleColor;

test.asp

dim conn,connstr  connstr="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath ("database2009.mdb")  set conn=server.createobject ("adodb.connection")  conn.open connstr  set rs=Server.CreateObject("ADODB.Recordset")     set cmd=Server.CreateObject("ADODB.Command")   with cmd      .ActiveConnection=conn      .CommandText ="tbArticleCross"   .CommandType = 4        end with  set rs=cmd.Execute(,"2009-6-1")