Subject | Re: [IB-Architect] Rows Affected inside of a stored procedure or trigger |
---|---|
Author | Ian Newby |
Post date | 2001-12-12T09:36:37Z |
Hi Jason,
A TQuery with an SQL of
"update employee set name = 'jason' where id='5' returning affected"
or
"insert into employee (id,name) values ('5','Jason') returning affected"
would return a result set of with 1 field called affected containing how
many records were updated/inserted, if the query was opened, rather than
execSQL'ed.
I guess the problem is if you merge returning affected with returning
[fieldname]. ie
"insert into employee (name) values ('Jason') returning
employee.id,affected"
I've no idea how this would work.
I suppose you could make "returns affected" and returns [fieldname...]
mutually exclusive.
Regards
Ian Newby
> > Allowing it to return a result set would mean that anyUsing the BDE <g> as an example,
> > client tool would work without changing the interface.
>
> How do you envision this being possible?
A TQuery with an SQL of
"update employee set name = 'jason' where id='5' returning affected"
or
"insert into employee (id,name) values ('5','Jason') returning affected"
would return a result set of with 1 field called affected containing how
many records were updated/inserted, if the query was opened, rather than
execSQL'ed.
I guess the problem is if you merge returning affected with returning
[fieldname]. ie
"insert into employee (name) values ('Jason') returning
employee.id,affected"
I've no idea how this would work.
I suppose you could make "returns affected" and returns [fieldname...]
mutually exclusive.
Regards
Ian Newby