I have a Storeprocedure which has 2 paramteres

1. Name
2. EmployeeId Output

Now I want to use this StoreProcedure to update the Column as EmployeeId in Different server & different table called TAble2

i.e I will pass name as "Samay" and it will return the EmployeeId as "123" which I will Update in TableB - EmployeeId

How Can i use the Storeproceure in VbScript which has an 1 output parameter

Please Advice

Re: Using Store Procedure through VBScript which has a output paramete by Bob

Bob
Wed Jun 23 12:42:23 CDT 2004

KritiVerma@hotmail.com wrote:
> I have a Storeprocedure which has 2 paramteres
>
> 1. Name
> 2. EmployeeId Output
>
> Now I want to use this StoreProcedure to update the Column as
> EmployeeId in Different server & different table called TAble2
>
> i.e I will pass name as "Samay" and it will return the EmployeeId as
> "123" which I will Update in TableB - EmployeeId
>
> How Can i use the Storeproceure in VbScript which has an 1 output
> parameter
>
You need to use a Command object. I've written an asp page that will
generate the code needed to execute a stored procedure. It is available
here:
http://www.thrasherwebdesign.com/index.asp?pi=links&hp=links.asp

After executing the Command, the output parameter value will be readable
via:

cmd.Parameters("@EmployeeID").value

Make sure you include the line

SET NOCOUNT ON

in your stored procedure to prevent the generation of resultsets containing
the "x records affected" messages.

HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.