Print Page | Close Window

error with const declaration - urgent, pl

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=11753
Printed Date: 31 March 2026 at 1:17am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: error with const declaration - urgent, pl
Posted By: simflex
Subject: error with const declaration - urgent, pl
Date Posted: 10 September 2004 at 9:11am

If I add another const to the existing 2, I get "subscript out of range" error

However, if I disable it,
lastID = rows(UBound(rows,2),COL_BLKID, I get no errors but I get no result either.

What I am trying to do is get the first number that appears on our result set and the last one there.

So far it isn't working.

Any urgent help would be greatly appreciated.

Just in case this might help, here is the query I am using:

   rs = "SELECT Full_Name, userid,from, To FROM mytable where ID =" & ID & " order by userid"

 

' Assign symbolic names to the columns in that array
CONST COL_NAME = 0
CONST COL_BLKID = 1


' How many rows are there?
BlockCount = UBound(rows,2) + 1

' full_name should be same in all rows, so get it from first row:
full_name = rows(0,COL_NAME)
' first id is in first row:
firstID = rows(0,COL_BLKID)
' last id is in last row:
lastID = rows(UBound(rows,2),COL_BLKID)




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net