August 8, 2012 at 11:13 am
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
August 8, 2012 at 12:07 pm
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
August 9, 2012 at 7:18 am
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!
August 9, 2012 at 6:37 pm
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
August 9, 2012 at 8:03 pm
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
August 13, 2012 at 1:54 pm
Any idea?
August 13, 2012 at 1:57 pm
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
August 14, 2012 at 11:22 am
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.
August 14, 2012 at 2:47 pm
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
August 14, 2012 at 8:59 pm
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)
August 15, 2012 at 10:15 am
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
August 15, 2012 at 12:36 pm
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!
August 16, 2012 at 2:54 pm
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