For Programmers: Free Programming Magazines  


Home > Archive > Visual Studio > October 2004 > Database Tools - a newbie(ish) question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Database Tools - a newbie(ish) question
BernieP

2004-10-19, 3:58 pm

An odd question, but hopefully someone out there will be able to help.

I have a VB.NET application that access JET databases that is working fine.
My users now want to be able to change the location of the databases
(currently hard coded). In VB6 with ADO that was simple (I used to create the
connection objects, recordsets etc. manually). However, being clever (or so I
thought), I used the tools in Visual Studio to create my datasets, and as a
result am having significant dificulty in changing the connection.

I have found the Windows Forms Designer generated code that sets the
ConnectString Property in the InitializeComponent method of the form, I have
not yet tried retrieving the connection string from the registry at that
point, but that will require my user to restart the application if they
change the DB source (not a problem, but not what has happened previously). I
have tried changing the OLEDBDataConnection Object ConnectionString property
at the time the user changes it, but this does not seem to work. Do I need to
refresh the connection somehow?

All help appreciated, as usual...

Bernie Porter
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com