Subject | RE: [IBO] Re: Alias conflict? |
---|---|
Author | Alan McDonald |
Post date | 2007-08-29T21:58:46Z |
> > p3pp3rh3ad wrote:I would have keylinksAutoDefine = False
> > > After upgrading to 4.8 (with FB1.54) I am getting an EIB_ISCError
> > > exception when a key is pressed in any field while trying to
> update a
> > > record:
> > >
> > > ISC ERROR CODE: 335544569
> > > ISC ERROR MESSAGE:
> > > Dynamic SQL Error
> > > SQL error code = -204
> > > alias PATIENT conflicts with an alias in the same statement
> > >
> > > PATIENT is the table name, I'm not using an alias. Insert works
> OK.
> > > What should I be looking for?
> >
> > Tell us what components you are using, and how you are using them
> (e.g.
> > TIB_Query or TIBOQuery, 'SELECT... FROM...', KeyLinks, RequestLive).
> >
>
> I have a TIB_DataSource conected to a TIB_Cursor with KeyLinks set to
> the PATIENT primary key (PATIENT.PATNUM) (KeyLinksAutoDefine = True).
> CheckRequired = True, PreparedEdits = True, Pessimistic Locking = True
> Update SQL:
>
> UPDATE PATIENT SET
> PATNUM = :PATNUM, /*PK*/
> BIRTHDATE = :BIRTHDATE,
> FNAME = :FNAME,
> GENDER = :GENDER,
> INITIAL = :INITIAL,
> LNAME = :LNAME,
> PATIENTID = :PATIENTID,
> PATNOTES = :PATNOTES
> WHERE
> PATNUM = :OLD_PATNUM
Pessimistic locking set to False unless you have a separate transaction set
tiConcurrency and the sql set to this - in fact, you can leave it out
altogether and let IBO generate it at run time.
> UPDATE PATIENT SETAlan
> BIRTHDATE = :BIRTHDATE,
> FNAME = :FNAME,
> GENDER = :GENDER,
> INITIAL = :INITIAL,
> LNAME = :LNAME,
> PATIENTID = :PATIENTID,
> PATNOTES = :PATNOTES
> WHERE
> PATNUM = :PATNUM