Searching a Table Column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using an SqlDataReader what is the best way to determine if a table column
has specified value?

Thanks, Justin.
 
If the column is of type of string use

if (!reader.IsDBNull(i) && (reader.GetString(i)=='myValue'))

Eliyahu
 
What is i representing?

Eliyahu Goldin said:
If the column is of type of string use

if (!reader.IsDBNull(i) && (reader.GetString(i)=='myValue'))

Eliyahu
 

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.

Ask a Question

Back
Top