[Info-ingres] RE: returning a single value from a database procedure in .NET



Make sure you are using release 3.0.2.105 or later. Bugs were fixed.

Use ExecuteNonQuery, not ExecuteScalar. The latter is used for
result-sets that have one row and one column.

Try using the escape sequence form of calling the procedure and use
parameter markers:

testCMD = new IngresCommand(
"{? = call usr_logon_rtn (?, ?)}",
conn);
testCMD.CommandType = CommandType.Text;

<add parameters with ReturnValue parm first>

testCMD.ExecuteNonQuery();

Hope this helps,
Dave


.



Relevant Pages