开发者

Find the connection-string

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?


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


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.


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;"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜