procedure
-
ExecuteNonQurey should only be used for inserts, updates and deletes, if your preforming a select you should be saying ExecuteReader to return what ever you want, hope this helps, need any more help just ask.
OdbcCommand cmd;
cmd = new OdbcCommand("abc", cn);
cmd.CommandType = CommandType.StoredProcedure;
OdbcDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
string s = dr.GetString(0);
}after doing this I am getting the same error after line cmd.commandtype=cmd.executereader... now what should i do..it says odbcexception was unhandled..
-
OdbcCommand cmd;
cmd = new OdbcCommand("abc", cn);
cmd.CommandType = CommandType.StoredProcedure;
OdbcDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
string s = dr.GetString(0);
}after doing this I am getting the same error after line cmd.commandtype=cmd.executereader... now what should i do..it says odbcexception was unhandled..
Like I said yesterday, the exception message is reasonably clear that there is a problem in your stored procedure
abc()
. If you cannot figure out what is wrong with it then post it here so an SQL expert can help. -
Like I said yesterday, the exception message is reasonably clear that there is a problem in your stored procedure
abc()
. If you cannot figure out what is wrong with it then post it here so an SQL expert can help. -
Sir there is no problem with my stored procedure..It is working fine in database..when i call through c# it throws error...
There's obviously some problem there. If you refuse to give us the full information we cannot help.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
There's obviously some problem there. If you refuse to give us the full information we cannot help.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
This is my procedure abc..
DELIMITER $$
DROP PROCEDURE IF EXISTS `userdb`.`abc`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `abc`()
BEGIN
select * from login;
END$$DELIMITER ;
-
I had seen that from original mysql query browser...but as u said i deleted that ' ' from procedure name and then tried but found the same error...
Sorry, but as I said that was an uneducated guess, but your error message is definitely complaining about that line. You could start a new thread in the MySQL[^] forum, to see if any expert sees the question. I would suggest you post your C# code and your stored procedure and the full exact text of the error message.
-
Sorry, but as I said that was an uneducated guess, but your error message is definitely complaining about that line. You could start a new thread in the MySQL[^] forum, to see if any expert sees the question. I would suggest you post your C# code and your stored procedure and the full exact text of the error message.
-
Well I don't think any of the MySQL experts are going to be looking here.
-
This is my procedure abc..
DELIMITER $$
DROP PROCEDURE IF EXISTS `userdb`.`abc`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `abc`()
BEGIN
select * from login;
END$$DELIMITER ;
You've explicitely changed the delimiter to $$, but terminated the select statement with a semicolon. Regards, Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
Me, 2012-05-24