Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing Stored Procedure 1

Status
Not open for further replies.

dbrom

Programmer
Feb 21, 2001
100
US
Hi everybody,

I have a problem executing a stored procedure from ASP. When I wite the following code:

cmdInsert = Server.CreateObject("ADODB.Command");
cmdInsert.ActiveConnection = conn;
cmdInsert.CommandText = "spInsertActivityLog";
cmdInsert.CommandType = adCmdStoredProc;

an error message comes up saying that 'adCmdStoredProc' is undefined. This is not the first time I use some of the ADO constants and get similar errors :( Can anyone help me out - I can't figure what the problem is what the problem might be. As you can see I use JScript.

Thanks in advance,
Dmitriy.
Dmitriy
dbrom@crosswinds.net
 
that means adCmdStoredProc is undefined :). You have to define it by including adovbs.inc or you can just add these lines

Dim adCmdStoredProc
adCmdStoredProc = 4

before your code above

or just change
cmdInsert.CommandType = adCmdStoredProc
to
cmdInsert.CommandType = 4

BTW: in ASP you don't need ; at the end of the line.
 
Thanks! Dmitriy
dbrom@crosswinds.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top