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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get Client App to recognize SQL SP output Parameter

Status
Not open for further replies.

metsey

Programmer
Mar 2, 2001
49
US
I have the following VB 6 code calling a sp in SQL 7.0. The sp returns a value through an output parameter. I cannot get the VB app to pickup the output parameter value.

With g_adoComm
.CommandType = adCmdStoredProc

' set the name of the stored procedure
.CommandText = "usp_GroupDesign"

' create and append the input parameter
.Parameters.Append g_adoComm.CreateParameter("ClientCode", adBSTR, adParamInput)

' set the initial value of the parameter
.Parameters("ClientCode").Value = sClient

' create and assign output parameter value to function output
.Parameters.Append g_adoComm.CreateParameter("@Client", adBSTR, adParamOutput)

'set connection object
.ActiveConnection = g_adoConn

.Execute

vReturn = .Parameters("@Client").Value

How do I get the client app to recognize the SQL Output Param? Any help would be greatly appreciated.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top