ASP调用存储结构失败,请问原因
数据库为:SQL Server 2000
存储结构如下:
CREATE PROCEDURE getsinfo @cid int
AS
select * from c where id=@cid
(语法检测通过)
代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
dim param
set cm=server.CreateObject("adodb.command")
set conn=server.createobject("adodb.connection")
aconnectionstring="provider=SQLOLEDB;data"_
&"source=(local);database=test;"_
&"UID=sql;PWD=;"
conn.connectionstring=aconnectionstring
conn.mode=admodereadwrite
set cm.activeconnection=conn ‘页面提示本行出错:800a0e7d|请求操作需要
_OLE_DB_会话对象,而当前提供程序不支持此条件
set param=cm.createparameter("cid",adinteger,adparaminput,4,2)
cm.parameters.append param
cm.commandtext="getsinfo" 'getsinfo 为存储结构名
cm.commandtype=adcmdstoreproc
conn.open
set rs=cm.execute()
if not rs.eof then
%>
......
除了页面提示的地方出错外,我还不知道还有错误没,请同志们帮忙!
如有可能,谁有调试通过的调用程序,回复给我看看(包括数据库的设置)