all groups > dotnet ado.net > may 2006 >
You're in the

dotnet ado.net

group:

ADODC refresh method fails after upgrading from XP SP1 to XP SP2


ADODC refresh method fails after upgrading from XP SP1 to XP SP2 Tony
5/31/2006 4:00:01 PM
dotnet ado.net:
After upgrading from XP SP1 to XP SP2 get "operation is not allowed when the
object is open" error messege. the app in production stop working properly.
The refresh method is available, but fails. Here is the code:
With Adodc1
..ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security
Info=False;Data Source=" & App.Path + "\PhoneNumbers.mdb" & ";
Mode=Read|Write"
..RecordSource = "select * from PhoneNumbers Order By Name"
..Refresh
End With
I need a solution in production,i.e I won't install the IDE in production.
Any ideas?


Re: ADODC refresh method fails after upgrading from XP SP1 to XP SP2 JohnRS4
6/10/2006 9:57:39 AM

Tony,
I have had the same scenario with apps built using VB6 SP6
these were working and then all of a sudden was getting 'unspecifie
errors' adodc1.

Running Compiled application
---------------------------
with runtime error -2147467259(80004005)
Automation error
Unspecified error


Running Code with the IDE
-------------------------
runtime error -2147467259(80004005)
Method 'Refresh' of object 'IAdodc' failed.


I went through the mill with this but got no specific answer - Afte
all these were applications which were running faultlessy for the las
number of years.

I decided to play a little with the code .... I did the following

created a new module (newmod.bas)
and entered the following -

Public Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds A
Long)

-----------------------

Then before each .refresh method I put the following

Sleep 10

- it worked !!!! - I know this is not a cure but a work around -
needed to do something and had spent a long time playing around wit
MDAC ,JET ,Pathces and needed to sort the issue - If I hear more -
will post it.In the mean can others confirm that my workaround work
for them ?

My edited code looks thus -

Dim strSQL As String
Dim rsCur As New ADODB.Recordset
With adoCur
.ConnectionString = cndb
.CommandType = adCmdText


.RecordSource = "SELECT * FROM Curr "
Sleep 10 ' New addition
.Refresh ' previous fail point
End Wit

--
JohnRS
-----------------------------------------------------------------------
JohnRS4's Profile: http://www.hightechtalks.com/m5
View this thread: http://www.hightechtalks.com/t37736
Re: ADODC refresh method fails after upgrading from XP SP1 to XP SP2 JohnRS4
6/12/2006 12:00:00 AM

After painstakingly rolling back updates and stripping out application
right back to a bare XP SP2 install - I still had this error.

So I decided to reinstall windows XP sp2 - I deployed my application a
usual and it worked without a problem !!!

While I was happy with this - I thought back - when XP was initiall
installed on this machine 'Format the partition as NTFS'(QUICK) wa
chosen. So I repeated this scenario using Quick format instead of
full format - and I had the same problem !!!

So stay clear of the Quick Format option on an XP install..

Suffice to say I am still shocked by this whole thing..

The only reason I decided to go through this whole scenario was th
fact
that I knew the application was working for years on various flavour
of operating systems without a problem..

Had this been a new app - I would have been questioning my methods !

I hope this can help someone else.

--
JohnRS
-----------------------------------------------------------------------
JohnRS4's Profile: http://www.hightechtalks.com/m5
View this thread: http://www.hightechtalks.com/t37736
AddThis Social Bookmark Button