The constraints were from another program I templated from. I’ve commented
them out for now. There are 1000 rows and about 16 columns.
The column I’m having the problem with is DocumentNumber. I also looked at
the VS SQL Builder. I'm just going to have to walk through the column and
declare the Indexed field as "No"
UPDATE StevesConfigMgmtLog
SET
[Acceptance(Y/N)] = ?,
ClassType = ?,
DateIn = ?,
DateOut = ?,
DCM_NDTApproved = ?,
DocumentNumber = ?,
DocumentType = ?,
Engine = ?,
Engineer = ?,
ErrorCategory = ?,
[GE_CauseCode/Type] = ?,
[IsCSI?] = ?,
Purpose = ?,
Remarks = ?,
ReviewerCauseCode = ?,
Subject = ?
WHERE
(ID = ?) AND
([Acceptance(Y/N)] = ? OR ? IS NULL AND [Acceptance(Y/N)] IS NULL) AND
(ClassType = ? OR ? IS NULL AND ClassType IS NULL) AND
(DCM_NDTApproved = ? OR ? IS NULL AND DCM_NDTApproved IS NULL) AND
(DateIn = ? OR ? IS NULL AND DateIn IS NULL) AND
(DateOut = ? OR ? IS NULL AND DateOut IS NULL) AND
(DocumentNumber = ? OR ? IS NULL AND DocumentNumber IS NULL) AND
(DocumentType = ?) AND (Engine = ? OR ? IS NULL AND Engine IS NULL) AND
(Engineer = ? OR ? IS NULL AND Engineer IS NULL) AND
(ErrorCategory = ? OR ? IS NULL AND ErrorCategory IS NULL) AND
([GE_CauseCode/Type] = ? OR ? IS NULL AND [GE_CauseCode/Type] IS NULL) AND
([IsCSI?] = ? OR ? IS NULL AND [IsCSI?] IS NULL) AND
(Purpose = ? OR ? IS NULL AND Purpose IS NULL) AND
(Remarks = ? OR ? IS NULL AND Remarks IS NULL) AND
(ReviewerCauseCode = ? OR ? IS NULL AND ReviewerCauseCode IS NULL) AND
(Subject = ? OR ? IS NULL AND Subject IS NULL)
"Steve B." wrote:
A particular column in my Access DB table, and the associated datagrid,
cannot have duplicate string entries. I've selected "Yes (no duplicates)" for
the Indexed Field Property of this column in the Access table.
When I call update(), the DB gets updated but throws an exception saying, in
affect, that I'm trying to change the key. This column is not the key.
How do I handle this? How do I stop the ex.message being thrown?
I guess I could always walk through the column searching for the value.
Steve