Subject How To InsertSQL, EditSQL & DeleteSQL
Author Anthony
I have a Midas app, using IBO_Queries on the middle tier.
On the client I am using a 1st class DBTreeview to navigate through
the data.
I have a Customer table and a premises table, joined by refno.

Now, what I want to do is to be able to join the 2 tables with my
IBOQuery, so that the users can 'toggle' between navigating by
Customer.Surname and Premises.Postcode.

My problems start with actually alterring the data.

The way I understand it, I can use EditSQL etc to do this.
I have generated the actual SQL and I believe I can assign all the
parameters in the "BeforeUpdateRecord" event of my datasetprovider
and then set Applied to True.

However, I don't know how to actually execute the EditSQL etc. I
mean, I can't just go ExecSQL - how does it know if it is deleting or
editting etc?

So basically I want to know how to do it and if what I am planning
will work, below is how I think it should be done - ???? denote not
sure.


In the Before Update record of the DSP

if UpdateKind = ukInsert then
begin
parambyname('AAA').AsString := DeltaDS.FieldByName('AAA').NewValue;
...
...
..
ExecuteInsertSQL;???????
end;

if UpdateKind = ukModify then
begin
....
....
...ExecuteEditSQL;????
end

etc......

Please CC reply to