I am not sure what is going wrong here. I have a stored procedure that
calls an SQLRPGLE program. The program is running fine as I have
verified in the debugger and sends the return value as expected.
Instead what is returned when looking at
`cmd.Parameters["@ISMATCH"].Value` is {}. I am guessing I am doing
something wrong. What could it be?

public bool IsValidTimesheet(int id)
bool isValid = false;

// Get the data from the iSeries
using (iDB2Connection conn = new
using (iDB2Command cmd = conn.CreateCommand())
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "LIB.CHECKHOURS";

iDB2DbType.iDB2Decimal).Value = id;
iDB2DbType.iDB2Char).Direction = ParameterDirection.Output;
isValid = (cmd.Parameters["@ISMATCH"].Value.ToString()
== "1") ? true : false;

return isValid;

I have the rest of the code documented at

Mike Wills

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-2022 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.