DataAdapter SelectCommand is NULL!!

L

Leon_Amirreza

this piece of code generate run time error "object reference not set to an
instance" :

SqlAdapter sqla = new SqlAdapter;
sqla.SelectCommand.CommandTimeout = 60;

SelectCommand is null, but when i check the dataset in the designer it has a
select command (actually adapter and table are created by by dragging the
table from server explorer to the dataset).
 

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

Top