Can't connect to sql server from an XP machine, but I can from win7

  • Hi there,

    I've been given access to a SQL Server and I wrote a VBA script (in excel) to query the DB and do some calculations/graph with the retrieved data.

    Everything works fine on my computer (windows 7). When I gave my excel document to co-worker (on XP), it won't connect and timeout. I tried it on a virtual machine I have (windows xp) and I have the same problem, it won't connect.

    I created a file called test.udl in which I configured the connection parameter as follow:

    Provider: Microsoft OLE DB provider for SQL Server

    Server name: 10.62.250.77\sqlserveraccept (which is a local IP)

    I used the user/pass I was given

    I selected the right database

    and when I click "Test Connection", it is successful on windows 7. I then copy the exact same file over to my XP VM, and it timeouts.

    Any idea what it could be? I disabled the firewall on the XP machine.

    Regards,

    Martin

  • Can you connect to the SQL instance via SSMS from the xp machines?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • That's interesting... after spending hours to upgrade my xp box to install SSMS, I just found out I actually can connect to SQL Server using SSMS, but still can't using the .udl or my excel macro.

    Hope that helps!

  • From there, I would look at the drivers used (e.g. ACE drivers for Excel) to make that connection. Compare between the XP machine and the ones that work.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Humm.. but my test.udl still doesn't successfully test the connection. So it's really more than Excel only.

    How can I see the driver you are referring to? I mean it's the same excel file on both my computers.

    Thanks

  • Any idea?

  • You can download from here.

    http://www.microsoft.com/en-us/download/details.aspx?id=23734

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Hi,

    I downloaded and installed it on to my XP vm and it didn't make it work.

    Do you think it could be some driver that gets installed with office 2010?

    Because the XP machine either don't have office at all or they have 2007.

  • The driver downloaded should be fine.

    I would start checking the connection strings and manipulating the string to see if there is something that the xp machines don't like.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Here is the connection string.

    Provider=SQLOLEDB.1;Password=mypassword;Persist Security Info=True;User ID=myuser;Initial Catalog=RINER.Cellulaire;Data Source=10.62.250.77\sqlserveraccept

    The IP is local to both computers (win7 & XP)

  • Try some of the different options illustrated here.

    http://www.connectionstrings.com/excel

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • It's the other way around.

    The data is in an SQL server and I'm connecting from excel to SQL server. I then put the data on an excel sheet to do some calculation and graph with it.

    The excel connects OK from win7 computer, but the exact same excel file doesn't connect when on an XP machine.

    thanks for your time!

  • Do you have the SQL Server OLEDB drivers installed on the XP machine? You said that you were able to connect via SSMS from XP, so we know that connectivity works. Have you tried specifying the port number in your connection string?

    Thanks,

    MWise

Viewing 13 posts - 1 through 12 (of 12 total)

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