Call stored procedure in JScript

Call stored procedure in JScript

Post by lifeng x » Sat, 27 Apr 2002 23:10:21

Can someone give me an example of using JScript to call a
SQL Server stored procedure through ADO? The stored
procedure should return a recordset with select statement,
and it will take at least one input prarm. I have been
trying to do this in my ASP pages. But I can't make it



1. ADO stored procedure call in JScript

I am trying to make an ADO stored procedure call in my ASP
page using JScript. The following is the code:

                var cn = Server.CreateObject
                var cm = Server.CreateObject
                var rs = Server.CreateObject
                cm.ActiveConnection = cn;
                cm.CommandText = "SP_GRP_URL";
                cm.CommandType = 1; // stored procedure
("USERID", 129, 1, 50));
                cm.Parameters("USERID") = USERID;
                rs = cm.Execute;

The problem is that I am getting an error message says
that"[Microsoft][ODBC SQL Server Driver][SQL Server]

was not supplied.". But as you can see from the code, I do
pass the input parameter "USERID" with the call.

What is wrong? What is the right way to do this?

Could someone help me on this?

Many thanks.


2. String to remote PORT

3. Calling Stored Procedure that calls Stored Procedure in ASP

4. Installation of SQL 7.0 on win2k SP2

5. Calling a Java Stored Procedure from another Java Stored Stored Procedure

6. Finding if Instance of SQL Server is running locally

7. help trans jscript file to stored procedure...


9. Help ! Jscript/ADO/Oracle Stored Procedure Exception Handling

10. Stored Procedure calling Stored Procedure

11. Call a stored procedure from another stored procedure

12. Calling a stored procedure with parameters from another stored procedure

13. Calling a Stored Procedure from a Stored Procedure