Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IBUpdateSQL.ModifySQL

25 views
Skip to first unread message

Juan Jose Ochoa

unread,
Feb 24, 2001, 5:38:44 AM2/24/01
to
I wrote something like that in the ModifySQL property:

execute procedure sp_Update :field1, :field2, :field3
and the procedure updates different tables.
It does what I want (partially). But I get the exception EIBClassError eith
message 'Update Failded', and doesn't let me continue.
When I re-run my app, Changes are done!
So, Where can I trap this exception?

Thanks
Juan Jose.


Juan Jose Ochoa

unread,
Feb 24, 2001, 6:11:09 AM2/24/01
to
I wrote the OnPostError event

Action:=daAbort;
DataSet.Cancel;
DataSet.Refresh;

and worked perfectlly.

Now I know hou to update multiple tables with a SP inside a IBUpdateSQL.

Thanks any way.

Juan Jose.


"Juan Jose Ochoa" <joc...@hotmail.com> wrote in message
news:3a96e66d_1@dnews...

Jeff Overcash (TeamB)

unread,
Feb 24, 2001, 1:42:51 AM2/24/01
to
IBUpdateSQL raises an exception if the modify SQL does not return a rowsaffected
on 1 and only 1. The SP will return a 0 for rows affected.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
The correct way to punctuate a sentence that starts: "Of course it is
none of my business but ~" is to place a period after the word "but".
Don't use excessive force in supplying such a moron with a period.
Cutting his throat is only a momentary pleasure and is bound to get
you talked about. (RAH)

Craig Stuntz

unread,
Feb 26, 2001, 9:22:06 AM2/26/01
to

The easiest solution here is probably to use TIBDataset instead of
TIBQuery + TIBUpdateSQL, since it doesn't raise this exception when
RowsAffected <> 1.

HTH,

-Craig

--
Craig Stuntz Vertex Systems Corporation
Senior Developer http://www.vertexsoftware.com

Delphi/InterBase weblog: http://delphi.weblogs.com

Juan Jose Ochoa

unread,
Feb 26, 2001, 10:14:09 PM2/26/01
to
Thanks
I hadn't realized it contains ModifySQL property. I shoud check manual to
refresh what the difference is. :)

Juan Jose.

"Craig Stuntz" <cstuntz@no_spam.vertexsoftware.com> wrote in message
news:3A9A668E.1D846164@no_spam.vertexsoftware.com...

0 new messages