i need Help
I started a project that is using a Access Database.
Now I loaded the Database in my Database Explorer in Visual Studio. I have already set the connection
with the Asistent. Because i am working at home, the destination of my Project is differen then the destination in my enterprise. But i dont want to have the database in the same location like the executable and the project files.
What i need is to change the connection string of this database at runtime. For example i make a codet that is looking for the database in all locations, when he has found the right location he change the connection string of this database to the new one.
But i am not speaking about DataAdapter, DataSet or DataTable, it is a Databae that i connct already in the Project on the left side in a Database explorer.
can u help me....
thanks you.... excuse me for my english, i am not very fort in english
HI,
I assume that you are using the wizard to access your database. If that's so, then you can see your connection string in the generated xsd file. Try looking for it in your project explorer.
Or you can find your connection object that was generated and manually change the connecitonstring property at runtime...
cheers,
Paul June A. Domag
Thanks a lot for you help..
Now i decide to work with normaly Dataset and DataAdapters.
I wont to use my Program localy on the pc, and the Database shoud be on a network disk. So after install the software on a client i can also use a xxxx.udl file for managing the access to the Database. I think this is a old kind of connection but it should be very easy to change if i need it. Now i try to access the Database over this .....udl file. Connection was I.O. But i after i change the Name of my Database or the location of the Database, and i also updated the changes in the ... udl file, my VB.Express can not find the Database. Why VB donf find the Database? In the Settings.settings of my Project i have already updated that this connection for the DataSet is now ovet the ...udl file but after Changing the location or the Name of Database, and after modifing my udl file their is no connection?!
What i have made wrong?