Hi, i am baffled with this simple problem.
I want to try and pull out some info from a datatable,
using a sql query. i don't want to use a stored
procedure. How do i phrase my commandtext? i've messed
around with "+" symbols and extra apostrophes with no
success.
see my code:
private string test(SqlConnection conn)
{
string t = "";
SqlCommand cmd = new SqlCommand("SELECT Id FROM MyTable
WHERE Description = 'ugly'", conn);
cmd.ExecuteNonQuery();
return t;
}
thank you in advance,
Chief