how to get sql row into variables

  • Thread starter Thread starter Thomas Henz
  • Start date Start date
T

Thomas Henz

Hi!

I'm trying to get a single data row (SELECT name,telnr FROM table WHERE
id=3) into a something so that I gain 2 variables with name and telnr
that I can print out or modify (locally not in the DB). What do I have
to do?

Thanks,

Tom
 
Use a SqlDataReader object, and then just use reader["fieldName"] to access
values.
 

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