Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AddWithValue 可以用 IN 嗎?

6 views
Skip to first unread message

tony

unread,
May 21, 2006, 4:26:02 AM5/21/06
to
WHERE CategoryName in(@CategoryName)


string selectString = "SELECT Products.* " +
"FROM Products INNER JOIN Categories " +
"ON Products.CategoryID=Categories.CategoryId " +
"WHERE CategoryName in(@CategoryName)";
SqlCommand cmd = new SqlCommand(selectString, con);
cmd.Parameters.AddWithValue("@CategoryName", category);

各位大大:
可以這樣寫呢!~
如果不行
可不可以教我要怎麼寫..
謝謝!

0 new messages