简体   繁体   中英

What do I need to do in order to make connection string work on win XP?

I have three PCs in my local network:

  1. MS Server 08 - running sql server,
  2. MS Win 7,
  3. MS Win XP

I have written a program that uses connection string in order to connect to database that is working on first PC. Now, my program connects successfuly from the first PC and from the second one. I can connect to the first server PC through sql server manager from all three PCs. The problem is, that when I try to connect through my program from third PC, I am getting connection string error (it shows only on this PC).

So, what do I need to install on win XP in order to make it work?

Also, here is my connection string:

<add name="MyDb" providerName="System.Data.SqlClient" connectionString="Data Source=192.168.0.14;Initial Catalog=AdData;User name=Name;Password=11111;" />

Edit: My firewalls on all PCs are disabled. Edit2: Here is the exception message:

the provider did not return a providermanifesttoken string

Create a udl file, if it connects then the problem is the code / application, if it does not connect, then it's your firewall, connections string, dll library etc. Well the important thing here is probably the connection string. Do the following: create an empty text file and rename it "myconnection.udl". Now double click on the file and it will launch an applet. You can configuer the connection to your database and test it. (it will pick up registered connection libraries etc). If it give OK, then open the udl file in notepad, you will see the correct connection string. Paste to your app connection settings. UDL files are generally misunderstood. They are simply a text file that holds the connection settings. They then call the connection dll. If the udl file works then you have a correct connection string 100%

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM