If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > VB v6 (ADO 2.7) - No char output calling SP on os/390 DB2 v.6

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-20-03, 13:01
sbreault sbreault is offline
Registered User
 
Join Date: Nov 2003
Posts: 1
Question VB v6 (ADO 2.7) - No char output calling SP on os/390 DB2 v.6

Arghh...VB v.6 using ADO v. 2.7 client calling a DB2 stored proc (written in COBOL) running on o/s 390 will not return character data in output parameters...only numeric.

Code sample:
-----------------
...
cmd.ActiveConnection = con
cmd.CommandType = adCmdStoredProc
cmd.CommandText = SP_NAME(i) 'array full of SCHEMA.SP_NAME
...
With cmd
'inputs:
.Parameters.Append .CreateParameter("@CSN", adChar, adParamInput, 6, P_CSN)
.Parameters.Append .CreateParameter("@EFF_DATE", adChar, adParamInput, 10, P_EFFDT)
'outputs:
.Parameters.Append .CreateParameter("@SN", adInteger, adParamOutput, , DFLT_NUM)
.Parameters.Append .CreateParameter("@CLASS", adChar, adParamOutput, 3, "")
'ERROR outputs:
.Parameters.Append .CreateParameter("@RETCD", adChar, adParamOutput, 2, "")
.Parameters.Append .CreateParameter("@SQLCODE", adInteger, adParamOutput, , DFLT_NUM)
.Parameters.Append .CreateParameter("@SQLSTATE", adChar, adParamOutput, 5, "")
.Parameters.Append .CreateParameter("@MODNAME", adChar, adParamOutput, 8, "")
.Parameters.Append .CreateParameter("@PARAGRAPHNAME", adChar, adParamOutput, 40, "")
.Parameters.Append .CreateParameter("@TBLNAME", adChar, adParamOutput, 18, "")
End With

...I get back @SN, but not @CLASS (or any other output para). Need some help, badly.

I'm guessing this is a ODBC/ADO (adChar) problem, but I thought someone may have tackled this already.

Steve
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On