Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

Parameters : the answer (3 replies)

$
0
0
Hello everybody,

I do not know exactly why this thread is closed :
http://forums.mysql.com/read.php?38,596544,596544#msg-596544

Here is the answer :
The question mark that comes before the name of a parameter in a query is not part of the name of the parameter.

When I type this instruction :
cmd.Parameters.Add("?Username", MySqlDbType.VarChar, 255).Value = Username;

there is a mistake in it : no parameter name begins with a question mark.

Replacing the line by this will solve the problem :

cmd.Parameters.Add("Username", MySqlDbType.VarChar, 255).Value = Username;

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>