No VB runtime error when SQL statement fails
From: Jarek (I.hate.spammers.jarekbed_at_poczta.onet.pl)
Date: 02/06/04
- Next message: Michael A. Gunther: "Need to change A Field Size"
- Previous message: Douglas J. Steele: "Re: Run-time error '3027': "Cannot update. Database or object is read-only"
- Next in thread: Phil Hunt: "Re: No VB runtime error when SQL statement fails"
- Reply: Phil Hunt: "Re: No VB runtime error when SQL statement fails"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 6 Feb 2004 21:40:44 +0100
I am currently developing a VB6 program which uses MS Access over DAO.
When I issue an SQL statement which contains a syntax error, my VB error
handler jumps in and I can rollback the transaction. So far, so good.
But, when there is a constraint violation, the SQL statement still fails,
but no VB error is being generated. I cannot trap this situation, I cannot
rollback the transaction. I commit, and then the database is corrupted.
What can I do?
- Next message: Michael A. Gunther: "Need to change A Field Size"
- Previous message: Douglas J. Steele: "Re: Run-time error '3027': "Cannot update. Database or object is read-only"
- Next in thread: Phil Hunt: "Re: No VB runtime error when SQL statement fails"
- Reply: Phil Hunt: "Re: No VB runtime error when SQL statement fails"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|