Steven
Thu Jun 24 11:16:24 CDT 2004
ooo nice one, thankyou :o)
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:#Yij5CgWEHA.808@tk2msftngp13.phx.gbl...
> Go here:
>
http://msdn.microsoft.com/library/en-us/ado270/htm/mdmscadoenumerations.asp
>
> From which you can link to :
>
http://msdn.microsoft.com/library/en-us/ado270/htm/mdcstcursorlocationenum.a
sp
>
> and
>
http://msdn.microsoft.com/library/en-us/ado270/htm/mdcstcursortypeenum.asp
>
> Bob Barrows
>
> Steven Burn wrote:
> > Bob,
> > To be honest, I didn't know about the two ad's you mentioned :o\
> >
> > Thanks for the info :o)
> >
> >
> > "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> > news:uhfalvfWEHA.3664@TK2MSFTNGP12.phx.gbl...
> >> On its own, you might not. Did you switch to using the less
> >> expensive cursor type and location: adOpenForwardOnly and
> >> adUseServer? Even if you did, you probably did not notice the
> >> decrease in memory resources and cpu cycles used on both the web and
> >> database servers when opening the less expensive cursor type. But I
> >> guarantee you that the servers did "notice" it, and if you make the
> >> change in enough pages that were using the more expensive cursor
> >> types, you may notice an increase in overall performance of your
> >> server.
> >>
> >> Of course, if your web server does not get a lot of usage, you still
> >> might not notice it, but that does not mean that this is not a Best
> >> Practice which you should get into the habit of using:
> >>
> >> Use the cheapest cursor type required to support your application's
> >> functionality. For the most part in ASP, you will not need to use a
> >> bookmarkable cursor (i.e., a cursor which supports scrolling and
> >> recordcount), so you should use the default cursor in almost all
> >> cases. If you DO need extra functionality (filter, etc.), then make
> >> sure you disconnect the recordset while processing it.
> >>
> >> Bob Barrows
> >>
> >> Steven Burn wrote:
> >>> Been taking a look into it since Aaron mentioned it ;o) (so far, I
> >>> can't see the difference as far as performance is concerned?)
> >>>
> >>>
> >>> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> >>> news:OwshDMfWEHA.204@TK2MSFTNGP10.phx.gbl...
> >>>> Again, this use of RecordCount requires the use of an expensive
> >>>> cursor type. Use the EOF property instead (as Aaron correctly
> >>>> suggested):
> >>>>
> >>>> '//immediately after opening the recordset:
> >>>> If not rst.EOF then
> >>>> '//recordset is not empty
> >>>> else
> >>>> '//recordset is empty
> >>>> end if
> >>>>
> >>>> Bob Barrows
> >>>>
> >>>> Steven Burn wrote:
> >>>>> I actually generally use;
> >>>>>
> >>>>> If rst.RecordCount > 0 then
> >>>>> '// Something
> >>>>> End If
> >>>>>
> >>>>> Just figured I'd be creative :o\
> >>>>>
> >>>>>
> >>>>> "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
> >>>>> news:#sb8OyeWEHA.2940@TK2MSFTNGP09.phx.gbl...
> >>>>>>> valTemp = rst.RecordCount
> >>>>>>> Select Case valTemp
> >>>>>>> Case 0
> >>>>>>> Response.Redirect "nothing_in_there.asp"
> >>>>>>> Case Else
> >>>>>>> Response.Redirect "something_in_there.asp"
> >>>>>>> End Select
> >>>>>>
> >>>>>> Except, RecordCount isn't available with the default cursor (-1
> >>>>>> is the default), so your Else will probably always fire.
> >>>>>>
> >>>>>> The EOF property will tell you if the resultset is empty without
> >>>>>> having to rely on a count.
> >>>>>>
> >>>>>> A
> >>>>
> >>>> --
> >>>> Microsoft MVP - ASP/ASP.NET
> >>>> Please reply to the newsgroup. This email account is my spam trap
> >>>> so
> >>>> I don't check it very often. If you must reply off-line, then
> >>>> remove the "NO SPAM"
> >>
> >> --
> >> Microsoft MVP - ASP/ASP.NET
> >> Please reply to the newsgroup. This email account is my spam trap so
> >> I don't check it very often. If you must reply off-line, then remove
> >> the "NO SPAM"
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>