Re: RecordChangeComplete and Primary Key constraint
From: Kevin Yu [MSFT] (v-kevy_at_online.microsoft.com)
Date: 09/30/04
- Next message: Neil Kerkin: "Drop Index Corrupts Data"
- Previous message: Stephen Howe: "Broken MSDN Microsoft link"
- In reply to: Olivier Matrot: "Re: RecordChangeComplete and Primary Key constraint"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 30 Sep 2004 02:59:33 GMT
Hi Olivier,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you have inserted a record which
violates the unique constraint, the status of the field doesn't change. If
there is any misunderstanding, please feel free to let me know.
Yes, you're right. The status property will not change when invalid row is
inserted to a recordset.
As far as I know, this is by design. According to the MSDN document, this
property indicates the status of a field. Generally, it is changed when
fields are created or inserted to the table. Also, changes to the value of
a Field object in the Fields collection of either a Recordset are cached
until the object's Update method is called. At that point, if the change to
the Field's value caused an error, OLE DB raises the error
DB_E_ERRORSOCCURRED (2147749409). The Status property of any of the Field
objects in the Fields collection that caused the error will contain a value
from the FieldStatusEnum describing the cause of the problem.
For more information, please check the following links:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/
mdprostatusfield.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/
mdevtwillchangerecord.asp
HTH.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
- Next message: Neil Kerkin: "Drop Index Corrupts Data"
- Previous message: Stephen Howe: "Broken MSDN Microsoft link"
- In reply to: Olivier Matrot: "Re: RecordChangeComplete and Primary Key constraint"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|