配合EXT用ASP写后台代码,想调用存储过程,但是却不知道怎么传多个参数。
一个参数的代码如下:
对于ADODB.Command怎么传多个参数呢?谢谢!
一个参数的代码如下:
<%@language=javascript%>
<script RUNAT=SERVER LANGUAGE=JAVASCRIPT>
var json;
try
{
var conn = new ActiveXObject("ADODB.Connection");
var cmd = new ActiveXObject("ADODB.Command");
var A = 1;
var ConnectionString="Provider=SQLOLEDB.1; Data Source=(local); User ID=sa;"+"Password=; Initial Catalog=powercat";
conn.Open(ConnectionString);
with(cmd){
ActiveConnection = conn;
CommandType = 4;
CommandText = "SP_A1";
}
var objRs = cmd.Execute(null,parseInt(A));
json="{success:true,data:{title:'"+objRs("B")+"'}}";
Response.Write(json);
cmd.close;
conn.close;
}
catch (e)
{
json="{failure:true}";
Response.Write(json);
}
</SCRIPT>
对于ADODB.Command怎么传多个参数呢?谢谢!