connection string path dynamically in vb.net -


i made desktop application in vb.net. give reference path of connection string through .udl. problem when place folder in location path string not change , hence results in error. kindly suggest. connection details follows

_connstr = system.io.file.readalltext("c:\users\avt\desktop\new folder\a.udl") con = new oledbconnection(_connstr) 

first of all, why using text file save connection string ?

go project properties -> settings , create connectionstring setting save connection string. that'll solve problem. using text file connectionstring not valid way.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -