SQL Error 17 - Another weird one.....

  • Hi,

    I have an .Net Smart Device application written in C#. It uses the WiFi connection to update a central SQL database. At least it does on the test machine (linking to the copy database on my PC), and it does on when accessing the database on the PC of a colleague (again via WiFi). But when it comes to the live database in the client site - uh oh no joy.

    I have a good WiFi connection there (and anyway I have tried using a connection via a USB cable, and it still doesn´t work) so the WiFi is fine.

    The connection string used is basically the same, and I have double (triple - even quadruple!) checked that the password and user id are correct. Have posted the connection strings lower down, with client names changed for confidentiality.

    The error code is 17 "SQL SERVER does not exist or access denied". Well it does exist so I presumed it was an issue with access. But (and here is the weird bit), if I copy the code and paste it into a Windows Application, run it from the PC as a PC application all works fine, as do other non-smart device applications using the same connection string!!!

    The firewall at the clients site is deactivated so should not be causing a problem.

    Anyone had anything similar - I am sure I will be back here soon posting a message with an embarassed smiley in it as it has to be something simple and obvious, but can I see it?

    Connections strings are:

    this.sql_con.ConnectionString = "server=tecnico;database=Client;user id=xx;password=xx"; - works

    this.sql_con.ConnectionString = "server=usrserver;database=Client;user id=xx;password=xx"; - fails

    Thanks in advance

    Keith

  • Believe to have tracked down the problem. Having studied the differences between the two machines thoroughly, one of the differences related to Windows XP. The client PC has had Service Pack 2 installed but none of the PC's at base have. Tried installing Service Pack 2 to a server at base and never before have I been so glad to see an application fail! Deinstalled SP2 and all works well.

    Checked on websites and there appear to be many issues with XP Service Pack 2........

    Now have to go back to the client site to find out who installed SP2 and why - hopefully will just be able to deinstall there without any issues.

    Thanks everyone who looked at this.

     

  • Instead of uninstalling Service Pack 2, you should open on the Firewall service the ports used by SQL Server (433?). Eventually the computer has to be updated, or have installed other firewall sofware and you will have the problem again.

  • Thanks for that - will check tomorrow on site but the firewall was deactivated (?!?!?) so not sure of the effect opening the ports would have.

    As for the updates will either wait for SP3 ( due out soon I believe) or will monitor the web for updates. At least I know where the problem is so can try at base without having the embarrassment of going on site and the software not working - believe me " It worked back at the office" sounded a lame excuse even to me - and I knew it was the truth!!  

  • It might be an MSDTC issue. MSDTC was changed in XP SP2 & WIN2K3 SP1

    http://support.microsoft.com/default.aspx?scid=kb;en-us;827805

    Tim S

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply