Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 24th, 2004, 01:15 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

hello siver_cuts ,

For getting the row count, you need to use adOpenStatic as the curser set. i.e. like below.

dim rst
set rst=Server.CreateObject("ADODB.RecordSet")
rst.CursorType=adOpenStatic
rst.Open qry, cnn
if(not(rst.Eof or rst.Bof)) then
    Response.Write("This recordset contains : " & rst.recordcount & " number of records<br>")
end if
 
Old June 24th, 2004, 03:43 AM
Authorized User
 
Join Date: Jun 2004
Location: , , India.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to silver_cuts Send a message via Yahoo to silver_cuts
Default

hey madhu,

thanks .. it worked with the RECORDSET property ...

but it is still not working with GETCOUNT method ..

any ideas why??

Sudhan.

 
Old June 24th, 2004, 03:54 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi hellosnv,

I think I am lost you now. I am not sure how your system is set up, and where the problem arises. Are you using Integrated Security? Anonymous access maybe? And is the object configured to run under a special identity, or is it running in the caller's context? Can you describe in a bit more detail how your setup looks like, and what you're trying to accomplish?
And if you do, can you start a new thread for it? Somehow this thread is actually about two different issues, which makes it hard to follow.

To silver_cuts:

What makes you think there is a GETCOUNT method? What object is exposing that method? It probably doesn't work because it is not a valid method of the objects I know.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: The Bends by Radiohead (Track 2 from the album: The Bends) What's This?
 
Old June 24th, 2004, 05:20 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

hello Sudhan,
Actually what is this GETCOUNT method ? If this is some method defined in a class of your own, you need to change this method.

Or are you using a COM object for handling DB related operations ? I think, then that needs to be changed.

Anyway, ADODB recordset will give the count only when curser set is adOpenStatic.
 
Old June 24th, 2004, 06:22 AM
Authorized User
 
Join Date: Jun 2004
Location: , , India.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to silver_cuts Send a message via Yahoo to silver_cuts
Default

Hi Madhu,

well i came across the GETCOUNT method in MSDN documentation .. in MSDN it is stated to be a method of the RECORDSET object ...

anyway i tried a lot but cant find a way to use it ... and i am completely happy with the RECORDCOUNT property ...

tell me more if you get any information on the GETCOUNT method ...

ofcourse i have an old version of MSDN in here ... jan 2001

Sudhan.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript runtime (0x800A0005) mail1 Classic ASP Basics 4 March 27th, 2008 03:42 PM
Microsoft VBScript runtime (0x800A0005) Swetz Classic ASP Components 0 May 14th, 2006 03:44 AM
Microsoft VBScript runtime (0x800A000D) stitch Classic ASP Basics 1 April 27th, 2006 02:23 PM
Microsoft VBScript runtime (0x800A0009) ppenn Classic ASP Databases 2 December 15th, 2003 01:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.