Board index » delphi » EIBClient error 'Update Failed

EIBClient error 'Update Failed

I have a form that shows two grids of data linked by a Key field
(med_rec).  The form is linked to a data module with two data
sources: 1) referencing  IBquery1 and 2) referencing IBtable1.  Using a
scroll bar attached to datasource2, I can append  new
records to IBTable1 and post the additions.  However, after editing a
records I get an error message when I try to post a
change: "EIBClientError with message 'Update Failed.'"  Data source2 is
linked to IBUpdateSQL2 in which The modifySQL is:

update PET
set
  MED_REC = :MED_REC,
  LAST = :LAST,
  FIRST = :FIRST,
  DNA_{*word*76} = :DNA_{*word*76},
  SCANDATE = :SCANDATE,
  PATIENT_NUMBER = :PATIENT_NUMBER,
  STUDY_DIAGNOSIS = :STUDY_DIAGNOSIS,
  PROJECT_EXTENSION = :PROJECT_EXTENSION,
  UPTAKE_CONDITION = :UPTAKE_CONDITION,
  GLUCOSE_USE = :GLUCOSE_USE,
  FILE_NAMECODE = :FILE_NAMECODE,
  COMMENTS = :COMMENTS,
  E_DPRIME = :E_DPRIME,
  REPORTDATE = :REPORTDATE,
  FIRST_CONSENT = :FIRST_CONSENT,
  SECOND_CONSENT = :SECOND_CONSENT,
  TRANSMISSION1 = :TRANSMISSION1,
  TRANSMISIION2 = :TRANSMISIION2,
  BLANK = :BLANK,
  TASK = :TASK
where
  MED_REC = :OLD_MED_REC and
  LAST = :OLD_LAST and
  FIRST = :OLD_FIRST and
  DNA_{*word*76} = :OLD_DNA_{*word*76} and
  SCANDATE = :OLD_SCANDATE and
  PATIENT_NUMBER = :OLD_PATIENT_NUMBER and
  STUDY_DIAGNOSIS = :OLD_STUDY_DIAGNOSIS and
  PROJECT_EXTENSION = :OLD_PROJECT_EXTENSION and
  UPTAKE_CONDITION = :OLD_UPTAKE_CONDITION and
  GLUCOSE_USE = :OLD_GLUCOSE_USE and
  FILE_NAMECODE = :OLD_FILE_NAMECODE and
  COMMENTS = :OLD_COMMENTS and
  E_DPRIME = :OLD_E_DPRIME and
  REPORTDATE = :OLD_REPORTDATE and
  FIRST_CONSENT = :OLD_FIRST_CONSENT and
  SECOND_CONSENT = :OLD_SECOND_CONSENT and
  TRANSMISSION1 = :OLD_TRANSMISSION1 and
  TRANSMISIION2 = :OLD_TRANSMISIION2 and
  BLANK = :OLD_BLANK and
  TASK = :OLD_TASK

Do you have any clues as to why I am getting this error message?  I use
a simular method to add and append records in
another application without any problems.

 

Re:EIBClient error 'Update Failed


This error message happens when the rows affected is anything other than 1.
This usually means your where clause it wrong in the ModifySQL of the
IBUpdateSQL.

Quote
dvtaylor wrote:

--
Jeff Overcash (TeamB)   I don't think there are any Russians
(Please do not email    And there ain't no Yanks
 me directly unless     Just corporate criminals
 asked.  Thank You)     Playing with tanks.  (Michael Been)

Re:EIBClient error 'Update Failed


Thanks Jeff,

I noticed that my previous forms did not use the updateSQL object at all
for the second table because I was not doing cashed updates.  When I
removed the updateSQL reference from TIBtable, the update worked.  I
need to know more about when to use updateSQL.

Quote
"Jeff Overcash (TeamB)" wrote:

> This error message happens when the rows affected is anything other than 1.
> This usually means your where clause it wrong in the ModifySQL of the
> IBUpdateSQL.

> dvtaylor wrote:

> --
> Jeff Overcash (TeamB)   I don't think there are any Russians
> (Please do not email    And there ain't no Yanks
>  me directly unless     Just corporate criminals
>  asked.  Thank You)     Playing with tanks.  (Michael Been)

Other Threads