it's overloaded so there are a few ways, but the simplest
on is like this....
sql.Append("SELECT * FROM myTable where Field1 = ? and
Field2 = ?");
cmd.Parameters.Clear();//just to be safe
cmd.Parameters.Add[firstValue];//might be Paren ()
instead, don't have an IDE in front of me.
cmd.Parameters.Add[secondValue];
You an also specify the type of the parameter, which
you'll see with intellisense when you type the parens
after add.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.