dbTalk Databases Forums  

Trying to call to stored proc from ASP?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Trying to call to stored proc from ASP? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
_adrian
 
Posts: n/a

Default Trying to call to stored proc from ASP? - 05-08-2006 , 11:11 AM






Hey all.. I've written a stored proc to execute a particular DTS package,
and that all works. What I'm trying to do now is trigger that process from
an ASP page... the following code *should* work I think.. and if so, then
what else might be keeping me from success???? HELP!
(The driver login criteria has been changed to protect the innocent)

<%
dim dataConn, sSql, rs
set dataConn = Server.CreateObject("ADODB.Connection")
dataConn.Open "Driver={SQL
Server};Server=hostservername;Database=DB;Uid=test ;Pwd=test;"
sSql = "{call SendDirectory}"
Set rs = dataConn.Execute(sSql) 'execute sql call
%>



Reply With Quote
  #2  
Old   
Mark Findlay
 
Posts: n/a

Default Re: Trying to call to stored proc from ASP? - 05-08-2006 , 01:10 PM






Hi Adrian,

If you are not passing any parameters to the stored procedure, you could
just use:

sSQL = "sp_stored_procedure_name"

Hope this helps
Mark

"_adrian" <test @ test.com> wrote

Quote:
Hey all.. I've written a stored proc to execute a particular DTS package,
and that all works. What I'm trying to do now is trigger that process from
an ASP page... the following code *should* work I think.. and if so, then
what else might be keeping me from success???? HELP!
(The driver login criteria has been changed to protect the innocent)

%
dim dataConn, sSql, rs
set dataConn = Server.CreateObject("ADODB.Connection")
dataConn.Open "Driver={SQL
Server};Server=hostservername;Database=DB;Uid=test ;Pwd=test;"
sSql = "{call SendDirectory}"
Set rs = dataConn.Execute(sSql) 'execute sql call
%



Reply With Quote
  #3  
Old   
_adrian
 
Posts: n/a

Default Re: Trying to call to stored proc from ASP? - 05-08-2006 , 03:15 PM



Ah yes.. we actually had that in place first... and the behavior is
identical... the page says everything ran fine, but nothing actually
happens. If the stored proc is manually triggered, then DTS does its thing
fine too. Everything appears to be fine.. but there's a disconnect happening
somewhere!



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.