How to change ConnectionString for DataSet at runtime?

  • Thread starter Thread starter wilson
  • Start date Start date
W

wilson

Hi. I'm new in VB.NET. I would like to ask a question.
How to change ConnectionString for DataSet at runtime?
Because I want to change the dBase data file directory according to the
program installed directory of user choice.
The DataSet is created using wizard at design-time.

Thanks for your help.
 
A few things:

Datasets don't have connection strings, connection objects do.
Datasets can contain table adapters, which in turn can have connection
objects associated with them.

You need only to change the ConnectionString property of the connection
object that is used to fill your dataset.
 
Let me try. Thank you.
A few things:

Datasets don't have connection strings, connection objects do.
Datasets can contain table adapters, which in turn can have connection
objects associated with them.

You need only to change the ConnectionString property of the
connection object that is used to fill your dataset.



--
 
Back
Top