Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access odbc DAO troubles

Status
Not open for further replies.

maxminh

Programmer
Apr 7, 2010
8
0
0
US
Perhaps someone can help me with a problem I am having.
Here is my situation, I am using access as a front end to a mysql database, using the odbc-mysql version 5.1 connector. I have some code that use a DAO connection object to insert new records into the database. To verify that the record was inserted, the code would check the recAffected property of the connection object after each insert statement execution.

My problem is that the recAffected is sometime zero, even when the record was successful inserted. Is there a fix to this problem? Or is there another way to check if a record is inserted without querying the database?

Any hint or advice would greatly be appreciated. Thanks
 
I used ADO instead and was able to detect when a record was successfully inserted, but now I can not delete or modify the inserted records using access.

Every time I tried to delete or modify the newly inserted record, the command would get cancel since Access thinks that some one else is editing that record. I am able to delete or modify other records that are in the database already.

Any ideas on how to fix the latest problem?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top