Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 10th, 2006, 09:59 PM
Registered User
 
Join Date: Jun 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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 ???



 
Old June 12th, 2006, 01:44 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

What kind of object is AdoVat?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
runtime error '-2147467259 (80004005) sonal Excel VBA 0 August 13th, 2007 07:06 AM
Run-time '-2147467259 (80004005)' Arsi Excel VBA 0 August 6th, 2007 04:00 PM
runtime error '-2147467259(80004005) denkidude Visual Basic 2005 Basics 1 March 16th, 2007 06:34 AM
run-time error -2147467259 (80004005) paul20091968 Excel VBA 0 May 11th, 2006 01:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.