Bug #40751 | Connector/NET 5.2.4 ExecuteScalar broken | ||
---|---|---|---|
Submitted: | 14 Nov 2008 18:15 | Modified: | 14 Nov 2008 21:27 |
Reporter: | Chris Oosthuizen | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 5.2.4 | OS: | Windows (XP SP2) |
Assigned to: | CPU Architecture: | Any |
[14 Nov 2008 18:15]
Chris Oosthuizen
[14 Nov 2008 18:33]
Reggie Burnett
Chris I can't reproduce this. Here is the code I am using against a 5.0 server using (MySqlConnection c = new MySqlConnection("server=localhost;database=test;uid=root")) { c.Open(); MySqlCommand cmd = new MySqlCommand(); cmd.CommandText = "spTest"; cmd.CommandType = CommandType.StoredProcedure; cmd.Connection = c; cmd.Parameters.Add("@id", MySqlDbType.Int32).Value = 1; object o = cmd.ExecuteScalar(); }
[14 Nov 2008 18:42]
Chris Oosthuizen
Reggie, I am running MySql 5.1.29 After having this problem, I simply uninstalled Connector/Net 5.2.4, installed Connector/NET 5.2.2 and the code works. Just to make sure I did nothing crazy, I uninstalled 5.2.2, reinstalled 5.2.4 and reproduced the problem. Right now I am back to 5.2.2 and experiencing no problem. Cheers, Chris
[14 Nov 2008 18:47]
Reggie Burnett
Are you using mysql on linux or some other system that might have case issues?
[14 Nov 2008 19:06]
Chris Oosthuizen
Reggie, Nope - as stated in this bug, I use it on Windows XP SP 2 Chris
[14 Nov 2008 19:16]
Reggie Burnett
Chris I'm trying to figure out what is going on here because it is simply not true that this flatly doesn't work. I have a test suite and example projects that prove it does work. do you have a proc and function of the same name in the same database?
[14 Nov 2008 21:27]
Chris Oosthuizen
Reggie, Your question regarding case sensitivity lead me to check. In my connectionstring I was refering to my database in uppercase. When I change the connectionstring to all lowercase, the cmd.ExecueScalar functioned properly. Thanks,for helping me figure this out. Chris