Subject | Using Stored procedures exclusively |
---|---|
Author | Rob Schuff |
Post date | 2002-04-02T20:50:10Z |
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.
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.
Any general comments appreciated.
many thanks!
rob
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.
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.
Any general comments appreciated.
many thanks!
rob