Bug #48117 | bug when using OUT variable. | ||
---|---|---|---|
Submitted: | 16 Oct 2009 13:43 | Modified: | 19 Oct 2009 17:56 |
Reporter: | Andre Cassar | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 6.1.2 | OS: | Windows (Vista) |
Assigned to: | CPU Architecture: | Any | |
Tags: | INOUT, OUT |
[16 Oct 2009 13:43]
Andre Cassar
[19 Oct 2009 11:05]
Tonci Grgin
Hi Andre and thanks for your report. Please use Parameter.AddWithValue as Parameter.Add is deprecated. Also, do say explicitly the direction of parameter: mySqlCommand.Parameters["?ReturnValue"].Direction = ParameterDirection.Output; Retest and get back to me with results. Which version of MySQL server do you use?
[19 Oct 2009 16:57]
Andre Cassar
ok using the output direction parameter seems like it solved the problem. Thanks. Sorry for the inconvenience caused :) but as I said this was something that was working before. Any I'm using the latest MySQL server 5.1
[19 Oct 2009 17:09]
Tonci Grgin
Andre, glad things work now. As for "it worked before", please read numerous bug reports in BugsDB to get up to speed. The origin of problem (and the reason I asked for server version) is in Bug#17898, take it from there. The principal reason for changing c/NET version to 6.1 were numerous changes that could break old behavior (there is no such changes from 5.1.x to 5.1.x+1 of course). So it is a good policy to o read changelog provided with every connector version o pay attention to IntelliSense (if you're using VS) as it warns you that Parameter.Add is obsolete and even tells you what to use.
[19 Oct 2009 17:56]
Andre Cassar
I checked for the intellisense obsolete message, but at no point my Visual Studio pointed this out. I'm using VS 2008.