"Re" Configure DataSet with Wizard

G

Guest

Once you have created a dataset in the Data Sources tab, there does not seem
to be a way to change the Data Connection. When you open the Configure
DataSet Wizard for the second time you begin on the second screen (the first
is the "Choose Your Data Connection" which is not enabled). Subsequent
refreshes always refer to the Connection established during creation in the
designer. However, what happens if your development environment changes and
you need to point to a different connection? You don't want to delete the
datasource and start all over. Isn't there a way to change the connection
which occurs at design time and therefore governs the refresh?

Changing the connection at runtime is not a problem, just change the entry
in My.Setting. Unfortunately, making a change here during design time is not
reflected in the Data Source Configuration Wizard either. Am I missing some
logic?
 
L

Linda Liu [MSFT]

Hi Michael,

Thank you for posting.

You have two options to change the connection string in the Data Source
Configuration Wizard.

1. Edit connection string stored in Application Settings

The precondition of this option is that you have saved the connection
string to the application configuration file.

To edit connetion string stored in the application settings, right-click
the project icon in Solution Explorer and select Properties command to open
the Project Designer. In the Project Designer, select Setting tab and
locate the connection you want to edit and edit the text in the Value box.

After you modify the connection string in the application settings, the
connection string in the Data Source Configuration Wizard is changed to the
new value. Perhaps you couldn't see the connection string changed to the
new value at once in the DataSource Configuration Wizard . It is because
the IDE doesn't refresh immediately. If you close this project and reopen
it in IDE, you will see the connection string changed to the new value in
Data Source Configuration Wizard.

2. Modify connection information that is saved in code by using the DataSet
Designer.

To edit a connection string stored in code, double-click the dataset in
Solution Explorer and select the TableAdapter or query with the connection
you want to edit. In the Properties window, select the Connection node and
modify the connection information.

Hope this is helpful to you.
If you have any other concerns or need anything else, please don't hesitate
to let me know.



Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
G

Guest

Thanks Linda. This does resolve the problem. I would like to see the IDE
update the connection string without close/open in the future.
 
L

Linda Liu [MSFT]

Hi Michael,

Thank you for your response.

I would like the IDE to update the connection string at once in the next
version as well.

If you have any other questions or concerns, please don't hesitate to
contact us. It is always our pleasure to be of assistance.

Have a nice day!


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 

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