EBDN - Community - Question & Answers

  Tuesday, 04 February 2020
  3 Replies
  1K Visits
0
Votes
Undo
Hi everybody,

after a migration to newer hardware and a software update of Engineering Base as well as an application, which Engineering Base needs access to (Office Manager, a document management system), our VBA macro to establish a connection to and access the Office Manager SQL database stopped working. It used to work prior to the update. We cannot find any mistake in the following piece of code and think that it should work. Note: the X's replace the information we took from the database of Office Manager.
Can any of you find a mistake or do you require more information?

Set conn = CreateObject("ADODB.SetConnection";)

Set Rs = CreateObject("ADODB.Recordset";)
Set Cmd = CreateObject("ADODB.Command";)
conn.CommandTimeout = 400
On Error Resume Next
conn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=XXX;Data Source=XXX;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=XXX;Use Encryption for Data=False;Tag with column collation when possible=False"

If conn.State = 0 Then
GoTo myError
End If

Best regards