Changing connection string in VB for .Net 2.0

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
drfunfrock
Posts: 5
Joined: Fri 14 Jul 2006 09:00

Changing connection string in VB for .Net 2.0

Post by drfunfrock » Fri 14 Jul 2006 09:04

I tried to make a dialog to change the connection string in my application settings but this member of My.settings ist readonly. What is the way to change the connection string? Is it possible to use the dialog that popups in Visual Studio?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 14 Jul 2006 11:03

Please describe what exactly you need or what is the problem.

drfunfrock
Posts: 5
Joined: Fri 14 Jul 2006 09:00

Post by drfunfrock » Fri 14 Jul 2006 11:18

I want to change the ConnectString in My.settings at runtime. The string is build by a wizard when you add a new datasource.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 14 Jul 2006 11:47

You are right, My.Settings.ConnectionString is read-only.
What is the purpose of changing it?

drfunfrock
Posts: 5
Joined: Fri 14 Jul 2006 09:00

Post by drfunfrock » Fri 14 Jul 2006 11:54

I want to change the database server and user at runtime thats the purpose, without compiling my application.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 14 Jul 2006 12:23

Dataset doesn't have connection information. It is stored in the TableAdapter.

Post Reply