Find the connection-string

若如初见. 提交于 2019-12-13 02:56:59

问题


I am creating database application in VB 2008.
How am i find the connection-string for that application?
what are facts that i have to include in connection-string?


回答1:


You don't say what database you are connecting to. You will find lots of details on a variety of databases here: http://connectionstrings.com/

Also, you would put the connection string itself into the App.config or web.config file. See also MSDN How to read connection strings from the web.config




回答2:


This depends on which database you want to connect to. Take a look at the excellent reference here:

  • http://connectionstrings.com/

Find your database server and see the connection string details.




回答3:


you might try to get the connection string as following:

  1. Create a new blank file and name it test.udl.

  2. Double click on it, and a "Data Link Properties" dialog should appear.

  3. On "Providers" tab, select "Microsoft OLE DB Provider for SQL Server" or "SQL Native Client"

  4. On "Connections" tab, try various settings and use the "Test Connection" button to test them. Click "Ok" when it works.

  5. Open the test.udl file in Notepad and copy the line that starts with "Provider=" into your Web.config "ConnectionString" value, BUT delete the little part that says "Provider=SQLNCLI.1;"



来源:https://stackoverflow.com/questions/4326022/find-the-connection-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!