6 messages in com.mysql.lists.dotnetParameters with ? Not working in MySQ...
FromSent OnAttachments
Peter de Bruine23 Aug 2007 01:52 
DG...@ NEFACOMP23 Aug 2007 02:21 
Peter de Bruine23 Aug 2007 02:43 
David Anderson23 Aug 2007 03:10 
Peter de Bruine23 Aug 2007 04:39 
Reggie Burnett23 Aug 2007 06:54 
Subject:Parameters with ? Not working in MySQL Connector Net 1.0.9 while with @ are working
From:Peter de Bruine (p.de@giscare.nl)
Date:08/23/2007 01:52:57 AM
List:com.mysql.lists.dotnet

Hi all,

We have developed an application which uses the MySQL Connector Net to get data from the database. Recently i upgraded to MySQL Connector Net 1.0.9 and found that the application wasn't working anymore. We got error saying "Parameter '?parametername' must be defined". Here a example:

MySqlCommand cmd = new MySqlCommand("SELECT something FROM sometable WHERE id=?someid", conn);

cmd.Parameters.Add("someid", MySqlDbType.Int32).Value = someobject.Id;

MySqlDataAdapter da = new MySqlDataAdapter(cmd); DataSet ds = new DataSet("sometable"); da.Fill(ds, 0, 0, "sometable");

This code worked fine until 1.0.9. When we change the ? to @ the code works again. Can anyone explain why this is?

Kind regards