D
Dean Slindee
I want to execute an RPG report (no parameters needed) from my VB.NET
application. This is ADO.NET using the IBMDA400 provider. The code is all
correct, except possibly the .CommandText line (from the AS/400's point of
view). Anyone got a working .CommandText statement that works? My previous
attempts are commented out (none worked).
Dim cn As New OleDbConnection(cnStringOLE)
Dim cmd As New OleDbCommand("", cn)
Dim da As New OleDbDataAdapter(cmd)
Try
cn.Open()
With cmd
.CommandType = CommandType.Text
'.CommandText = "{{CALL /QSYS.LIB/" & strLibrary & ".LIB/" &
strProgram & ".PGM(?,?,?)}}"
'.CommandText = "{{CALL /QSYS.LIB/" & strLibrary & ".LIB/" &
strProgram & ".PGM}}"
'.CommandText = "{{CALL /QSYS.LIB/HHSLIBF.LIB/SCR130.PGM}}"
.CommandText = "{{CALL /HHSLIBF.LIB/SCR130.PGM}}"
.ExecuteNonQuery()
End With
Catch exc As Exception
Call ExceptionHandler(csqlAdmin, exc)
Debug.WriteLine(Err.Number, Err.Description)
Finally
cn.Close()
da = Nothing
cmd = Nothing
cn = Nothing
End Try
Thanks,
Dean Slindee
application. This is ADO.NET using the IBMDA400 provider. The code is all
correct, except possibly the .CommandText line (from the AS/400's point of
view). Anyone got a working .CommandText statement that works? My previous
attempts are commented out (none worked).
Dim cn As New OleDbConnection(cnStringOLE)
Dim cmd As New OleDbCommand("", cn)
Dim da As New OleDbDataAdapter(cmd)
Try
cn.Open()
With cmd
.CommandType = CommandType.Text
'.CommandText = "{{CALL /QSYS.LIB/" & strLibrary & ".LIB/" &
strProgram & ".PGM(?,?,?)}}"
'.CommandText = "{{CALL /QSYS.LIB/" & strLibrary & ".LIB/" &
strProgram & ".PGM}}"
'.CommandText = "{{CALL /QSYS.LIB/HHSLIBF.LIB/SCR130.PGM}}"
.CommandText = "{{CALL /HHSLIBF.LIB/SCR130.PGM}}"
.ExecuteNonQuery()
End With
Catch exc As Exception
Call ExceptionHandler(csqlAdmin, exc)
Debug.WriteLine(Err.Number, Err.Description)
Finally
cn.Close()
da = Nothing
cmd = Nothing
cn = Nothing
End Try
Thanks,
Dean Slindee