Subject | RE: [IBO] Using Params |
---|---|
Author | Svein Erling Tysvær |
Post date | 2001-01-08T13:27:53Z |
It is useful if you have a complex query for which IBO cannot guess the
UPDATE statement - or if you're using stored procedures to do the update.
Normally you won't need EditSQL at all if you set your KeyLinks
appropriately and remember to set RequestLive to True (or include FOR
UPDATE in your original SQL).
Set
At 15:19 08.01.2001 +0200, you wrote:
UPDATE statement - or if you're using stored procedures to do the update.
Normally you won't need EditSQL at all if you set your KeyLinks
appropriately and remember to set RequestLive to True (or include FOR
UPDATE in your original SQL).
Set
At 15:19 08.01.2001 +0200, you wrote:
>What is the EditSQL property primarily used for? Would it be better for me
>to have a seperate TIB_Query for Update and Display purposes?
>
>Dion.
>
>
>-----Original Message-----
>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.
>>
>>
>>
>>
>>
>
>
>
>
>
>
>
>