> On Jun 26, 2:51 pm, Paul Clement
> <UseAdddressAtEndofMess...@swspectrum.com> wrote:
[quoted text clipped - 25 lines]
> The database is in a local network. It is on the same machine as
> application.
how long is "for some time", and is this consistent (ie, does it happen
about the same time every time).
Does it happen at the shortest interval (1 second <or less?>)
(You may need to add a time printout to your code to find out)
or, thinking macroscopic instead of microscopic, do you mean the program
worked OK for some months (years?), then stopped working.
Have you tried backing up the database, deleting all records in the
original, and seeing if the problem still occurs.
Has there been any OS/hardware changes (I'm just stretching the
imagination here - it's unlikely for your problem, but stranger things
have stumped the best of programs)
Think of ANYthing that was done to the database or program about the
time the error started occuring.
Your info is rather brief, so there are all sorts of questions that you
could be asked. Please be patient and be prepared to get asked a bit
more about your program, so that you or someone else can come up with
the right answer to your query.
CookNick1970@gmail.com - 27 Jun 2008 15:06 GMT
> CookNick1...@gmail.com wrote:
> > On Jun 26, 2:51 pm, Paul Clement
[quoted text clipped - 52 lines]
>
> - Show quoted text -
it worked fine for months (9), stopped from time to time (once in a
week).
I put new database instead of the old and the same error occurred
again after few hours (4-5) of proper functioning. After few hours (2)
again. And after 5 hours again.
As far as I know there were ne changs on this machine.
Thanks for your time!
Ralph - 30 Jun 2008 01:00 GMT
On Jun 27, 12:48 pm, argusy <arg...@slmember.on.net> wrote:
<snipped>
> >> ¤
> >> ¤ strQry="INSERT INTO table (...) VALUES (...)"
> >> ¤ Set adoConn= New ADODB.Connection
> >> ¤ adoConn.Open connectionString
> >> ¤ adoConn.Execute strQry
> >> ¤
I can't think of anything specific, but ..., I would be uncomfortable with
creating a new Connection every 1-2 seconds if the above is a true
reflection of your code.
ADO uses connection pooling. Thus it is possible with a tight loop to
actually have more than one "connection". [The error "Operation must use an
updatable query" is to some extent a catch-all.] This 'new' connection will
not be reflective of any specific lock/cursor attributes you may have set
but the default authentication info.
One would have to know more about the specific code you are using to provide
more information. But in the meantime try creating a single ADODB Connection
object outside the 1-2 second loop, and then arrange your code to do
something like this ...
' on init of App ..
Dim adoConn As ADODB.Connection
Set adoConn = New ADODB.Connection
' set the connection string
' set the attributes
...
' loop
' create strQry
adoConn.Open
adoConn.Execute strQry
adoConn.Close
...
' on termination of app
Set adoConn = Nothing
and see if the problem doesn't go away.
Also, are you enumerating the ADODB.Connection.Errors collection to check
for additional information?
-ralph