Page 1 of 1

ParameterCheck

Posted: Fri 22 Apr 2011 07:48
by mlagasio
Hi

with the following piece of code

UniConnection conn = new UniConnection(cs.ConnectionString);

UniCommand cmd = new UniCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.StoredProcedure;
//cmd.ParameterCheck = true;
cmd.CommandText = "MyStoredProcedure";

....some parameter defs

UniParameter par4 = new UniParameter("v_Activated", UniDbType.Int);
par4.Direction = ParameterDirection.Output;
cmd.Parameters.Add(par4);

conn.Open();
cmd.ExecuteNonQuery();

Activated = (int)cmd.Parameters["v_Activated"].Value;

all runs fine; if I decomment cmd.ParameterCheck = true, I've a cast exception in the last line (the connection is to Oracle and the stored procedure parameter v_Activated is defined as number). I've seen that the c# type of Value is UniDecimal type.

Best Regard
Marco

Posted: Fri 22 Apr 2011 13:01
by Shalex
Thank you for your report. We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.

Posted: Thu 05 May 2011 10:19
by mlagasio
Hi,

waiting your news about this topic, we have think a bad patch like

Activated = Convert.ToInt(((UniDecimal)cmd.Parameters["v_Activated"].Value).Value);

but we hope that your patch arrive as soon as possible.

I've also found another problem that we report I another post.

Regards, Marco

Posted: Fri 13 May 2011 14:13
by Shalex
The bug with the UniCommand.ParameterCheck property is fixed. I will post here when the corresponding build of dotConnect Universal is available for download.

Posted: Thu 19 May 2011 10:49
by Shalex
New build of dotConnect Universal 3.20.50 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/univer ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .

For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=21035 .