Re: Effects on RST in Calling Proc
- From: "David W. Fenton" <dXXXfenton@xxxxxxxxxxxxxxxx>
- Date: Wed, 07 Sep 2005 14:51:55 -0500
Tim Marshall <TIMMY!@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
news:dfmjk7$qk4$1@xxxxxxxxxxxxxxxxxx:
> David W. Fenton wrote:
>
>> Obviously, the snapshot avoids that, but I think it's better to
>> code the original procedure in a way that is likely to survive
>> the largest number of revisions without needing to be altered,
>> and to me, storing the PK value has that advantage over either
>> alternative that is dependent on the state of the recordset,
>> rather than derived from the underlying data.
>
> Thanks for the feedback.
>
> In the original proc, the recordset is snapshot and is passed to
> the called proc so that another field can be searched for a value
> that is being tested in the calling proc. So the nature of the
> two together is such that the recordset will not be changed.
If your code or the context in which it is used never changes, then
it's not an issue. I prefer writing code that will survive
foreseeable changes, even ones that are mistaken.
> I think you're right, the PK find first alternative is probably
> better, though. But as I said, the nature of my procedures in
> this case are such that changes made to the recordset in the
> second procedure would not be appropriate. I suppose the two
> could have been melded into one procedure, but I thought the
> second could lend itself later in development to other procs
> similar to the one here that calls it.
My point is not about the code in its current state, but about what
might happen in the future when you or another coder has forgotten
the original imitations on what you can do to the code. By using PK
navigation, you avoid the issue entirely.
> I try as much as possible to avoid data manipulation by row
> processing and prefer set processing, ie, I prefer to execute an
> update or insert statement as opposed to going through each row in
> a recordset and doing edit/update, so I generally stick with
> dbopensnapshot.
But there are operations that need to be performed that *can't* be
done with set processing, so one sometimes does need to edit an
actual recordset.
I have never used snapshots because my impression was that they were
much sloer than dynasets. I do know that at one point I got religion
and tried using them all over the place and the app slowed to a
crawl, so I switched back to the default recordset type, dynasets.
--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
.
- Follow-Ups:
- Re: Effects on RST in Calling Proc
- From: Tim Marshall
- Re: Effects on RST in Calling Proc
- References:
- Effects on RST in Calling Proc
- From: Tim Marshall
- Re: Effects on RST in Calling Proc
- From: rkc
- Re: Effects on RST in Calling Proc
- From: David W. Fenton
- Re: Effects on RST in Calling Proc
- From: rkc
- Re: Effects on RST in Calling Proc
- From: David W. Fenton
- Re: Effects on RST in Calling Proc
- From: rkc
- Re: Effects on RST in Calling Proc
- From: David W. Fenton
- Re: Effects on RST in Calling Proc
- From: Steve Jorgensen
- Re: Effects on RST in Calling Proc
- From: rkc
- Re: Effects on RST in Calling Proc
- From: Tim Marshall
- Re: Effects on RST in Calling Proc
- From: David W. Fenton
- Re: Effects on RST in Calling Proc
- From: Tim Marshall
- Effects on RST in Calling Proc
- Prev by Date: Re: Build comma-delimited list from table
- Next by Date: Re: REPOST: Unique connection ID not name.
- Previous by thread: Re: Effects on RST in Calling Proc
- Next by thread: Re: Effects on RST in Calling Proc
- Index(es):
Relevant Pages
|