run time error -2147467259(80004005)
My application used to work and had been fine
for years - on win2k,win Me,Win Xp until now.
On an XP SP2 machine
"run time error -2147467259(80004005)
unspecified error"
when I run the application
--------------------------------------------
when I run it through the VB6 IDE i get
"Adodc4
Unspecified Error
I press 'OK'
and I get
"run time error -2147467259(80004005)
method 'Refresh' of object IAdodc failed"
-----------------------------------------------
When I select debug in the IDE after the error it highlights
the .refresh as the fault.
It worked when I stepped through the code so I decided to do the following.
1) I created a new module called NewMOD.bas
with the following code
Public Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
2) I then edited my code by adding
Sleep 20
before each .refresh method .
sample code before which created the error.
--------------------------------------------------
With AdoVat
.ConnectionString = cndb
.RecordSource = "Select * from Vat " & _
"Order By ID;"
.Refresh
End With
--------------------------------------------------
Sample of code which worked
--------------------------------------------------
With AdoVat
.ConnectionString = cndb
.RecordSource = "Select * from Vat " & _
"Order By ID;"
Sleep 20
.Refresh
End With
--------------------------------------------------
I know that this works as I have tested it - but this is not good
enough for me. The application was working for years but has now started
to cause problems on SXP sp2.
I have been through SP2 rollback / reinstall updates
MDAC_typ installs of varying degrees from 2.5 (jet included) to 2.8 with SP's
JET 4.0 updates patches etc. Office and VB6 SP6 IDE reinstall.. all to no avail.
It seems like some timeout issue - as it works with the 20ms Sleep
can't make out why it happens on this particular machine when all
deployments and patches have been done the same for many different
machines.
While I have a workaround - I don't like it at all.
Can anyone shine some light on the subject ???
|