Re: Passing an int to a query
Posted by: David
Date: March 10, 2005 01:51PM

The MySql Connector uses question marks to denote parameter names, so the following line:
param.ParameterName = "@Id";

should be:
param.ParameterName = "?Id";

Then, your sql string becomes:
"SELECT HasVoted FROM valid_voters WHERE (yourField = ?Id);"

That should do the trick.

David

Options: ReplyQuote


Subject
Written By
Posted
March 08, 2005 11:31AM
March 10, 2005 09:39AM
Re: Passing an int to a query
March 10, 2005 01:51PM
March 11, 2005 08:33AM
March 11, 2005 09:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.