Strange problem with Access 2000

  • Thread starter Thread starter Yuri
  • Start date Start date
Y

Yuri

I have very strange problem with Access 2000.
Sometimes (it does not happen permanently), when I update
DB from my VB application using very simple Insert or
Update SQL statement, nothing happens (Access does not add
new row or update existing one) and I don't get error!!!
I don't use 'On Error Resume Next' or any other error
handlers and I don't send NULL parameters.
My SQL statements are really very simple, for example:

SQL = "Insert Into t1 (f1,f2,f3) Values(1,2,3)"
con.Execute SQL

Any ideas???

Thanks a lot,
 
You may have locked records that can't be updated at that instant. I suggest
2 possible remedies:

1. Try using DAO instead of ADO. DAO works faster on JET databases.
2. Try wrapping your insert statement in a Transaction with Eollback in case
of failure. At least you'll be able to write your own custom error message.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
I use transactions but Access does not return me error!!!
It seems like it just ignoree my commands!
 
I use transactions but Access does not return me error!!!
It seems like it just ignoree my commands!

Have you tried testing and enumerating the ADO Connection object's Errors
colection?

If con.Errors(0).Number <> 0 Then
For Each xErr In con.Errors
MsgBox "Error " & xErr.Number & " from " & xErr.Source & " = " &
xErr.Description
Next
End If
 
Back
Top