How to Change Connection String of VB.NET Project at Design Time
One of the problems that a beginner encounter when there is a project uploaded here, is they do not know on how to change the connection string that points to the correct database location. This is true with MS Access and even with SQL Server. Some programmers don’t add a code that will automatically change the location of the database just in case it will be ported in other machine.
Here’s an example of MS Access connection string that cannot be used in other machine.
C:\Files\Data.mdb
If the source code is extracted on different folder then the project will not run.
Here’s an example of SQL Server that needs to be modified if run on other machine.
Data Source=My-PC\SQLEXPRESS;Initial Catalog=SalesReport;Integrated Security=True
If the name of the computer is not “My-PC” and the SQL Server instance is not “SQLEXPRESS”, then the project will not run.
The following is a tutorial on how to change the connection string of any project
Double click My Project.
Click on Settings and change the connection string on the “Value” column.
Comments
Library System
yah.. i have the same problem
hello godevening
You can use ini file
not working
Add new comment
- Add new comment
- 157 views