Jesse is right. You use the ? to start a parameter name. > -----Original Message----- > From: Rehcra [mailto:[EMAIL PROTECTED] > Sent: Friday, December 02, 2005 2:26 PM > To: Jesse Castleberry; mysql@lists.mysql.com > Subject: Re: DOT.NET Connector and Stored Procedures: Exception trying to > retrieve parameter info > > This fixes my problem. Thanks!. Now to figure out where I got the > ampersand > from I thought it was in an example. > > On 12/2/05, Jesse Castleberry <[EMAIL PROTECTED]> wrote: > > > > Have you tried using "?" instead of "&"? I'm very new to both MySQL and > > Stored Procedures, but I've got seversl stored procedures working right > > now, > > and I had to put a question mark in front of the parameters before it > > would > > work: > > > > myCmd.Parameters.Add(New > MySql.Data.MySqlClient.MySqlParameter("?tbl", > > "escdofficer")) > > myCmd.Parameters("?tbl").Direction = ParameterDirection.Input > > > > Jesse > > > > ----- Original Message ----- > > From: "Rehcra" <[EMAIL PROTECTED]> > > To: <mysql@lists.mysql.com> > > Sent: Friday, December 02, 2005 2:28 PM > > Subject: DOT.NET Connector and Stored Procedures: Exception trying to > > retrieve parameter info > > > > > > I'm having a problem getting parameters working. > > > > Mysql 5.0.16 > > mysql-connector-net-1.0.7 > > VB.NET 1.1 > > > > mysql> SHOW CREATE PROCEDURE tbl_slct \G > > *************************** 1. row *************************** > > Procedure: tbl_slct > > sql_mode: > > Create Procedure: CREATE PROCEDURE `tbl_slct`(IN tbl CHAR(64)) > > READS SQL DATA > > BEGIN > > SET @s = CONCAT('SELECT * FROM ' , tbl); > > PREPARE stmt FROM @s; > > EXECUTE stmt; > > END > > 1 row in set (0.00 sec) > > > > Public Function Test() As DataTable > > If myConn.State <> ConnectionState.Open Then > > myConn.ConnectionString = myConnString > > myConn.Open() > > End If > > > > Test = New DataTable > > > > Dim myCmd As New MySql.Data.MySqlClient.MySqlCommand("tbl_slct", myConn) > > myCmd.CommandType = CommandType.StoredProcedure > > > > myCmd.Parameters.Clear() > > myCmd.Parameters.Add(New MySql.Data.MySqlClient.MySqlParameter("&tbl", > > "escdofficer")) > > myCmd.Parameters("&tbl").Direction = ParameterDirection.Input > > > > Dim myAdapter As New MySqlDataAdapter(myCmd) > > myAdapter.Fill(Test) '*** raises MySqlException > > End Function > > > > "Exception trying to retrieve parameter info for tbl_slct: Parameter > 'tbl' > > is not defined" > > > > What am I missing? > > > > Thanks, > > Steve > > > > > > > -- > Rehcra
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]