× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello all,

I am trying to develop a VB app using ADO. The server is an AS/400. I have
a CL Program that simply retrieves a data area into a parameter. I want to
retrieve that parameter back into my VB program. Here is the VB code:

Public Function rebuildIsRunning() As Boolean
Dim cm As ADODB.Command
Dim Rcds As Variant
Dim Parms As Variant

Set cm = New ADODB.Command

Set cm.ActiveConnection = frmMain.dc.cn
cm.CommandText = "{{CALL /QSYS.LIB/QGPL.LIB/RBLDISACT.PGM(?)}}"
cm.Prepared = True
cm.Parameters.Refresh
Set Parms = cm.CreateParameter("var", adChar, adParamInputOutput, 1)
cm.Parameters.Append Parms
Parms = Array("T")
cm.execute Rcds, Parms, adCmdText
If Parms(0) = "Y" Then
    rebuildIsRunning = True
Else
    rebuildIsRunning = False
End If


End Function

I put a line of code in my CL that will send a message displaying the
passed parameter ("T") to my message queue. That part works. The problem is
when trying to look at PARMS coming out I get a "Type mismatch" error
message. If I debug it, the debugger states "PARMS(0)=Missing".


Thanks,

Mark


Mark Walter
Sr. Programmer/Analyst
Hanover Wire Cloth a div of CCX, Inc.
mwalter@hanoverwire.com
http://www.hanoverwire.com
717.637.3795 Ext.3040



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.