Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 asp sproc

Author  Topic 

jhermiz

3564 Posts

Posted - 2004-09-07 : 14:32:56
How do I call a stored procedure from asp ?

Is there a command object just like vb ?

Thanks,

PS: Syntax would be helpful

Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/

jhermiz

3564 Posts

Posted - 2004-09-07 : 14:36:48
Google is a must

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q164/4/85.asp&NoWebContent=1

Thanks,
Jon

Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/
Go to Top of Page

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-09-07 : 19:18:26
You can also call an SP directly using the following syntax:
cn.storedProcedureName parameter1, parameter2 etc etc
, where cn is your ADO connection object.
But it is limited in what it can do. For example, I don't think it can return OUTPUT parameters (though I would be happy for someone to correct me....)
It's not a documented feature AFAIK, but I've found it handy because you don't have to declare command objects and the like
Go to Top of Page
   

- Advertisement -