Subject Re: [IBO] Using Stored procedures exclusively
Author Jason Wharton
Rob,

Not much time, let me say real quick, I like the idea of having a stored
procedure which returns column values. This would be a nice way to avoid
having to use the buffersynchroflags re-fetch if upon executing the DML
stored proc its return values were spliced into the buffer. This could also
eliminate the need for GeneratorLinks too and allow triggers to set things.
You would just have to make sure it returned the pertinent column values.

I will add this capability as an automatic feature in the next major version
of IBO.

Few more comments below.

Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Rob Schuff" <rob@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, April 02, 2002 1:50 PM
Subject: [IBO] Using Stored procedures exclusively


> hi folks,
>
> I am just now venturing into the world of using stored procedures for all
> select, insert, update, and delete (SUID) activities. I'm hoping someone
> will give some general advice and be able to answer a couple of questions.
> We are using TDataset stufg with TIBOQueries almost exclusively. D5.01
and
> IBO v4.2Fn
>
> 1. We code the insert update and delete procedures to execute the SP's in
> question. This seemed to work well until i thought we should return the
> newly generated primary key as part of the Insert SP. When we did this we
> started getting an error about expecting a message length of 8 and getting
> 0. As I am writing this I am thinking that in general it really doesn't
> make sense to have the stored procedure return the primary key of the
record
> it just inserted. Comments here?
>
> 2. Do we need to set the keylinks properties still? So far everything
still
> seems to work as expected but its very early to tell for sure.

Your inserts won't work if your key values are generated in the proc or the
triggers.

> 3. Anybody have a general comments about doing all activities through SPs
> and how it changes the way a delphi app is coded? We are doing this to
set
> the stage for a developing a solid journaling system.

Using procedures for selecting data makes it so that you cannot use search
mode and dynamic where clause optimizied queries.

> Any general comments appreciated.
>
> many thanks!
>
> rob