Multiple Access Databases

  • Thread starter Thread starter Mathew
  • Start date Start date
M

Mathew

I want to redo my Forms in VB.NET. Now when I go and test
my Forms to make sure they work I want to set up a second
ACCESS file as a test database. When everything works and
I want to switch over to my Production database how would
I do that? Would I have to go into all my VB forms and
redo my ADO links or is there an easier way?
 
Hi Mathew,

Place your connection string in app.config file:
<configuration>

<appSettings>

<add key="ConnectionString" value="your connection string" />

</appSettings>

</configuration>



Once you have app.config file (you might add it via New Item/Application
Configuration if there is no file in the project) you might query it for
config file directly:

string connString =
System.Configuration.ConfigurationSettings["ConnectionString"];

or you can event bind the propery to your connection object at design time.
 
Miha

Where do I go to add my connection string?
-----Original Message-----
Hi Mathew,

Place your connection string in app.config file:
<configuration>

<appSettings>

<add key="ConnectionString" value="your connection string" />

</appSettings>

</configuration>



Once you have app.config file (you might add it via New Item/Application
Configuration if there is no file in the project) you might query it for
config file directly:

string connString =
System.Configuration.ConfigurationSettings ["ConnectionString"];

or you can event bind the propery to your connection object at design time.


--
Miha Markic - RightHand .NET consulting & development
miha at rthand com


Mathew said:
I want to redo my Forms in VB.NET. Now when I go and test
my Forms to make sure they work I want to set up a second
ACCESS file as a test database. When everything works and
I want to switch over to my Production database how would
I do that? Would I have to go into all my VB forms and
redo my ADO links or is there an easier way?


.
 
Hi,

First add Application Configuration file (you'll see it in project as
app.config) to your project and then add
<appSettings> node to it.

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com

Mathew said:
Miha

Where do I go to add my connection string?
-----Original Message-----
Hi Mathew,

Place your connection string in app.config file:
<configuration>

<appSettings>

<add key="ConnectionString" value="your connection string" />

</appSettings>

</configuration>



Once you have app.config file (you might add it via New Item/Application
Configuration if there is no file in the project) you might query it for
config file directly:

string connString =
System.Configuration.ConfigurationSettings ["ConnectionString"];

or you can event bind the propery to your connection object at design time.


--
Miha Markic - RightHand .NET consulting & development
miha at rthand com


Mathew said:
I want to redo my Forms in VB.NET. Now when I go and test
my Forms to make sure they work I want to set up a second
ACCESS file as a test database. When everything works and
I want to switch over to my Production database how would
I do that? Would I have to go into all my VB forms and
redo my ADO links or is there an easier way?


.
 
Back
Top