Click here to Skip to main content
15,906,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I used my app to connect to SQL db, I changed
it and want to connect to a datasource now in
visual studio.

How is this possible?
Can I just replace my Connection String?

Please any help would be appriciated
Posted

Yes; you merely need to change the connection string to one that is appropraite for your data source.

Of course, you could keep a number of available connections in a config file and switch as and when. There are articles a-plenty on doing that if you care to search here or on Google.
 
Share this answer
 
You will just have to cite the datasource of your control either a dataset or a datatable. I also use a datasource when im retrieving or making CRUD commands.
like:

VB
...
Dim ds as Dataset
Listbox1.Datasource = ds
...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900