> Some sort of code would be helpful.
No problem - First off, how would you like the user to select the
database to use? i.e. a combobox, listbox, etc...
Thanks,
Seth Rowe
Sankalp wrote:
> Yes I have the connection strings with me before hand, but how can I
> match the database name to the connection string.
>
> Some sort of code would be helpful.
>
>
> Thankyou
>
>
> rowe_newsgroups wrote:
> > This doesn't seem all that complicated. Presuming you know what the
> > connection string will be for each db, then all you need to do is match
> > the Database name to the connection string. If you really wanted to, a
> > select case could handle this, or am I missing something?
> >
> > Thanks,
> >
> > Seth Rowe
> >
> >
> > Sankalp wrote:
> > > Currently I am developing a advanced VB 2005 application which
> > > Display's/ Updates / (Creates New ) data in the database. For this
> > > purpose I am using databound controls, i.e. all my datagrids, textboxes
> > > etc.. are directly linked to the database.
> > >
> > > Initially I was using My.Settings.Con ,( where Con being the
> > > connection string in the app.config file) to reference the connection
> > > string used by these table adapters.
> > >
> > >
> > > Now the problem is that, due to a sudden change is requirement, I need
> > > to add in multiple connection strings ( i.e give users the option to
> > > connect to different databases during application start up ) . Since
> > > all these databases have the same table name and underlying structure I
> > > don't need to change my program ( Logic ) at all.
> > >
> > > I need to give the users to ability to select the database at
> > > application startup( First Time , after installation ) and then give
> > > them the ability to change the database during runtime,\ AND after the
> > > user finishes working with the application( i.e Closes the application)
> > > and then returns, the application should automatically point to the
> > > last database the user worked with.
> > >
> > >
> > > I am using Visual Studio 2005 , .NET 2.0
> > >
> > >
> > >
> > > I am not sure how to do this. Any help in this regard will be
> > > gratefully appreciated.
|