Q
Problem solve Get help with specific problems with your technologies, process and projects.

Can I change sqldataAdapter.Selectcommand dynamically at run time?

I want to change sqldataAdapter.Selectcommand dynamically at run time. I made a Web page that shows records from a table, but I don't now how do refresh it with the new selectcommand. Thanks for your time.
You have to issue a new adapter.Fill() command to get the fresh results with the new command. Always remember the command must be executed again, as the data is not "live," but rather pulled out from the database and displayed. You have to perform a new fill and databind operation to refresh.

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close