URGENT SQL SERVER and EXCEL VBA CONNECTION ISSUE
- or -
Post a project like this1847
£25(approx. $31)
- Posted:
- Proposals: 2
- Remote
- #2337478
- Awarded
Description
Experience Level: Intermediate
We use a spreadsheet to collect and distribute various data into sheets for company use.
We are using MS Excel 2013 and an early version of MS SQL Server Which worked perfectly without any errors, here is the code from our VBA file:
Dim con As ADODB.Connection
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset
Set con = New ADODB.Connection
Set cmd = New ADODB.Command
Set rs = New ADODB.Recordset
MyConStr = "Provider=SQLOLEDB;Data Source=sqlserver\SQL;Initial Catalog=MYDB;user id=sa;password=Mon87653day9856;
con.Open MyConStr
Now we have upgraded to SQL Server 2017, we get the error.
Unable to complete login process due to delay in opening server connection
I have tried looking at pipes and changing the order, still get the error.
I have downloaded the new MSOLEDBSQL driver and still get the error.
I have tried the trusted connection and time out settings and still get the error.
NOTES:
If i chose to run the code after the error has stopped the file from opening, I click debug and then run the code it all works perfectly, odd one.
I can connect to the SQL Server using the Management Studio from both the Server and the Computer which will be running this code, with no issues
Any one got any ideas?
We are using MS Excel 2013 and an early version of MS SQL Server Which worked perfectly without any errors, here is the code from our VBA file:
Dim con As ADODB.Connection
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset
Set con = New ADODB.Connection
Set cmd = New ADODB.Command
Set rs = New ADODB.Recordset
MyConStr = "Provider=SQLOLEDB;Data Source=sqlserver\SQL;Initial Catalog=MYDB;user id=sa;password=Mon87653day9856;
con.Open MyConStr
Now we have upgraded to SQL Server 2017, we get the error.
Unable to complete login process due to delay in opening server connection
I have tried looking at pipes and changing the order, still get the error.
I have downloaded the new MSOLEDBSQL driver and still get the error.
I have tried the trusted connection and time out settings and still get the error.
NOTES:
If i chose to run the code after the error has stopped the file from opening, I click debug and then run the code it all works perfectly, odd one.
I can connect to the SQL Server using the Management Studio from both the Server and the Computer which will be running this code, with no issues
Any one got any ideas?
Mike M.
99% (28)Projects Completed
30
Freelancers worked with
26
Projects awarded
38%
Last project
27 May 2020
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies