I written coding below it display error
"Fatal error encountered during command execution."
How can i rectify
Coding is....
MyTrans = Myconn.BeginTransaction()
Mycmd = New MySqlCommand()
Mycmd.Connection = Myconn
Mycmd.CommandText = "DELIMITER $$ " & _
" CREATE PROCEDURE `Sp_example`(in Name varchar(45)) BEGIN " & _
" declare _output int; " & _
" select count(id) from name " &_
" where createdby=_Userid " &_
" into _output; " &_
" select _output; " _
" END $$ " & _
" DELIMITER ; "
Mycmd.CommandType = CommandType.Text
If Myconn.State <> ConnectionState.Open Then Myconn.Open()
Mycmd.ExecuteNonQuery()
MyTrans.Commit()
Loading
Mahesh ChandPosted Aug 19, 2009, 11:03 AM
One way to figure this out is copy your SQL command text in Debug mode and copy same SQL string and run on the database and see if SQL query executes.