hey guys
I am having some problems with trying to get results from MySql sp in .net.
My sp
My CodeCode:CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_LoginCheck`() BEGIN Select First_Name, Last_Name From tblUserMaster Where Email_Id='xxx'; END
My ErrorCode:Dim Cmd As New OdbcCommand("sp_LoginCheck()", Con) Cmd.CommandType = CommandType.StoredProcedure Dim Dtr As OdbcDataReader = Cmd.ExecuteReader() Cmd.Dispose() If Dtr.HasRows Then Response.Write("Welcome " & Dtr("First_Name") & " " & Dtr("Last_Name")) Else Response.Write("No Results") End If Dtr.Close()
Really have no idea and no experience with MySql and stored procedures.Code:ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.51b-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sp_LoginCheck()' at line 1
Can anyone help me
@J, Response.Write(Cmd.CommandText.ToString()) also doesnt write the resultant query
Micky



LinkBack URL
About LinkBacks

Reply With Quote



Bookmarks