Bug #47021 | "Failed to update CommandText" error dialog when removing database name | ||
---|---|---|---|
Submitted: | 31 Aug 2009 14:38 | Modified: | 15 Jul 2010 19:22 |
Reporter: | The Assimilator | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S3 (Non-critical) |
Version: | 6.0.4 | OS: | Windows (XP Pro SP2) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[31 Aug 2009 14:38]
The Assimilator
[31 Aug 2009 14:39]
The Assimilator
Error generated when removing database name from CommandText
Attachment: sproc-param-error.PNG (image/png, text), 13.25 KiB.
[1 Sep 2009 6:19]
The Assimilator
Updated OS.
[9 Sep 2009 7:14]
Tonci Grgin
Verified just as described. Environment: Remote MySQL server 5.1.31 on OpenSolarisx64 c/NET 6.0.4 on Win2K8x64 with VS2008Pro SP: DELIMITER $$ DROP PROCEDURE IF EXISTS `ptestfwsel` $$ CREATE DEFINER=`root`@`%` PROCEDURE `ptestfwsel`(IN param1 INT) BEGIN SELECT CURRENT_DATE AS cd, RAND(param1) AS rnd, param1 AS parval; end $$ DELIMITER ; Now, I am not so convinced this is truly a bug as you are warned of "... and might not reflect data retrieved by your command." which is, in fact, true... Reggie, Wlad?
[9 Sep 2009 12:54]
The Assimilator
Just to make things clearer: in both cases it's the *same* stored procedure on the same server/database. If you use the procedure as-is, everything is fine. If you change the procedure name to remove the database name - without recompiling the procedure or making any other changes to the TableAdapter - this error occurs. Hence I have to disagree and say that it's definitely a bug. "Parameter 'name' was not found in the collection." is an ArgumentException explicitly raised by the GetParameterFlexible() method when it can't find the parameter it's told to - which, from my understanding, should never happen if the identical stored procedure is used.
[10 Sep 2009 6:21]
Tonci Grgin
There is a possibility that the problem causing this is different than the one described in Bug#47013 so please check that report against the patch too.
[15 Jul 2010 19:22]
Reggie Burnett
This was fixed with the patch on the related bug mentioned. The database name is no longer included in the SQL.