Subject | RE: [IBO] Using Params |
---|---|
Author | Helen Borrie |
Post date | 2001-01-08T14:48:18Z |
At 03:19 PM 08-01-01 +0200, you wrote:
are always best addressed by beginning at the beginning. :))
Helen
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>What is the EditSQL property primarily used for? Would it be better for meFirst show us your SQL and tell us what you used for KeyLinks. Problems
>to have a seperate TIB_Query for Update and Display purposes?
>
>Dion.
are always best addressed by beginning at the beginning. :))
Helen
>-----Original Message-----All for Open and Open for All
>From: Svein Erling Tysvar
>[mailto:svein.erling.tysvaer@...]
>Sent: 08 January 2001 03:07
>To: IBObjects@egroups.com
>Subject: Re: [IBO] Using Params
>
>
>Well, you're using IBO in a way I'm not used to (but it may well be legal).
>You mention using the EditSQL, but quote neither the EditSQL nor the SQL
>itself. Quoting these may help us to help you.
>
>What happens if you use another query component solely for the update
>(connected to the same transaction), and do a qryGrades2.Execute instead of
>Open? I normally use a DSQL for updates like this, and don't know whether
>TIBOQuery has an equivalent Execute or ExecSQL procedure or not.
>
>Another thing worth checking is if your main select query has "FOR UPDATE"
>included or RequestLive set to True - I don't know if it matters or not
>when you've specified EditSQL, but it's worth a try.
>
>I was once told to use TransactionIsActive rather than InTransaction. Don't
>remember the reason for this though and don't think it has anything to do
>with your current problem...
>
>HTH,
>Set
>
>At 13:39 08.01.2001 +0200, you wrote:
> >Hi,
> >
> >I keep getting an access error with the code below. I want to pass
> >parameters in order to update a table. I have assigned the following SQL to
> >EditSQL for qryGrades. I think my problem is a BDE mentality!?
> >
> >Help will be greatyly appreciated.
> >
> > if not trnGrades.InTransaction then trnGrades.StartTransaction;
> >
> > try
> > try
> >
> > { The tree is being edited. Try and update the record on the
> >database. }
> > qryGrades.Params[0].AsInteger := TNodeTypeData(Node.Data^).Ref;
> > qryGrades.Params[1].AsString := S;
> > qryGrades.Open;
> >
> > if trnGrades.InTransaction then trnGrades.Commit;
> >
> > except on EIB_ISCError do
> >
> >
> > { Don't change the node value to the new value. }
> > abort;
> > end;
> >
> > finally
> > qryGrades.Close;
> > end;
> >
> >Thanks,
> >Dion.
> >
> >
> >
> >
> >
>
>
>
>
>
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________