Subject RE: [IBO] Join edit
Author Helen Borrie (TeamIBO)
At 11:05 AM 17-01-02 -0800, you wrote:
>Do I understand the situation?


>The InsertSQL(and the other 2), provide a means to populate the parameters
>automatically. What is still required is a TIB_DSQL component with which to
>effect the intended changes to the dataset by the stored proc on the server.

No, they provide a means to apply an alternative DML statement to those three methods, instead of the one that IBO would automatically construct during the Insert, Edit and Delete methods in a "regular" dataset (SELECT <fieldlist> from OneTable....).

I put you crook by not noticing that your previous posting was talking about InsertSQL, not a DSQL component.

>... procedure AQryBeforePost(...
> with AStoredProc do
> begin
> { values are assigned by IBO therefore: }
> ExecSQL;
> end;

No, nothing of the sort...

What should happen when Insert is called is that the dataset should put the dataset into dssInsert. Then, when Post is called it should

1) test to see whether the InsertSQL statement is prepared and, if not, prepare it.
2) pick up the values for the same-name columns from the new record (which has had data entered by the user) and assign them to the params your InsertSQL statement .
3) perform the SQL command in the InsertSQL, in this case, EXECUTE the SP.

So forget about doing stuff in handlers all over the place, it should all be happening in the dataset.

>IBO Help:-
>l As with EditSQL and DeleteSQL, when your dataset is the output of a SELECT
>from a stored procedure, or a joined dataset where you want to your insert
>to add rows to more than one table, it provides a way to pass parameters to
>a stored procedure you have created to perform one or more operations that
>will generate new rows in the dataset.

That means just what it says. InsertSQL receives parameters from the newly inserted row in the main dataset and fires off the statement.

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at