G
Guest
Hello,
I have an Access 97 database with VBA code that is designed to import data
into text files from various data sources. A VB Script is scheduled as a
windows task and it calls the Access VBA code (sometimes 5 times for 5 data
sources). This works fine most of the time but I occasionally get
connectivity errors. I read article 269495 for the error: Multiple-step OLE
DB operation generated errors" when opening ADO connection but it doesn't
deal with "intermittent" causes. Here is part of the code that creates the
connection and recordsets:
Set conn = CreateObject("ADODB.Connection")
Set res = CreateObject("ADODB.Recordset")
conn.Open "FILEDSN=" & strODBC 'VB Script passes the location of the
FILEDSN
res.LockType = 1
res.Open strRecSet, conn
AND Later (another is created a little differenly):
Set conn1 = CreateObject("ADODB.Connection")
conn1.ConnectionString = "FILEDSN=" & UDDEST
conn1.Open
Set comm1 = CreateObject("ADODB.Command")
Set comm1.ActiveConnection = conn1
Any suggestions on why this might occur very intermittently? Is the code
OK? Would it just be due to a slow network ?
Thanks
I have an Access 97 database with VBA code that is designed to import data
into text files from various data sources. A VB Script is scheduled as a
windows task and it calls the Access VBA code (sometimes 5 times for 5 data
sources). This works fine most of the time but I occasionally get
connectivity errors. I read article 269495 for the error: Multiple-step OLE
DB operation generated errors" when opening ADO connection but it doesn't
deal with "intermittent" causes. Here is part of the code that creates the
connection and recordsets:
Set conn = CreateObject("ADODB.Connection")
Set res = CreateObject("ADODB.Recordset")
conn.Open "FILEDSN=" & strODBC 'VB Script passes the location of the
FILEDSN
res.LockType = 1
res.Open strRecSet, conn
AND Later (another is created a little differenly):
Set conn1 = CreateObject("ADODB.Connection")
conn1.ConnectionString = "FILEDSN=" & UDDEST
conn1.Open
Set comm1 = CreateObject("ADODB.Command")
Set comm1.ActiveConnection = conn1
Any suggestions on why this might occur very intermittently? Is the code
OK? Would it just be due to a slow network ?
Thanks