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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Return a Value From a Stored Procedure

Author  Topic 

besadmin
Posting Yak Master

116 Posts

Posted - 2009-02-12 : 14:32:27
Hey guys!
Here is what I am trying to do. I have a Web Page that calls a Stored Procedure, the Stored Procedure calls a DTS job. The jobs imports a Text file and says the number of lines, like 723. How do I get the Stored Procedure to recieve that 723 as a return value so i can then pass it back to my Web Page so when you click the button you get back the number of records that were inserted.

Thanks a lot for any help and responses!!

Later.

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-02-12 : 14:58:25
Look up OUTPUT variables.

About halfway down this page is an example

http://www.exforsys.com/tutorials/sql-server/sql-server-creating-stored-procedure-with-input-and-output-parameters.html
Go to Top of Page

besadmin
Posting Yak Master

116 Posts

Posted - 2009-02-12 : 15:45:17
Thanks a lot for the reply. I am not sure how to get the vaiable i want though?
How do i retrieve the variable from the DTS job?
Any more tips/examples from anyone??

Thanks a ton RickD, and anyone else who can help!
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-02-13 : 05:16:17
You asked for it from a stored proc..

It is a long time since I have used DTS, but I would guess you could use a global variable..
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-14 : 02:09:42
quote:
Originally posted by besadmin

Thanks a lot for the reply. I am not sure how to get the vaiable i want though?
How do i retrieve the variable from the DTS job?
Any more tips/examples from anyone??

Thanks a ton RickD, and anyone else who can help!


see this:-
http://www.sqldts.com/234.aspx
Go to Top of Page
   

- Advertisement -