BeginTrans
From: Monzer George Yazigi (monzer_yazigi_at_NOSPAM.hotmail.com)
Date: 12/31/04
- Previous message: Bill Todd: "Re: Slightly OT : threads"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Dec 2004 19:19:54 +0300
Dear All
I have MSAccess 2003 Database file, with an ADO connection to it.
I have two tables Master and Details within the database.
I have the following steps:
1. ADO Connection Begin Transaction
2. Master Table: Insert New Record
3. Detail Table: Insert New Record Related to Inserted record in the
master
4. I have OnNewRecord Event assigned to the Detailed Table to set the
Key value related to the Master Table
5. DBGrid assigned to the detailed table.
Problem:
When filling in a record through the DBGrid, everything works fine
until I try to insert a new record, I get a message saying:
"You can not add or change a record because a related record is
required in table "Master Table"
Anybody can help me here?
I know I can post the master table and then proceed. But thats not
what I need. The problem happens is the user decided to cancel the
transaction, then I have to manully delete the master reocrd. While I
need to have the TransCommit and RollbackTrans function do the job for
me?
Regards
- Previous message: Bill Todd: "Re: Slightly OT : threads"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|