Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - SQL HELP - SELECT STATEMENT
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SQL HELP - SELECT STATEMENT

 Post Reply Post Reply Page  <1234 5>
Author
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 8:42pm
IsNull should work. Try
IsNull (arrRound(3,1))
note the additional ')' to close the ISNull Function
Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 9:03pm

Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 1]'

 

<% If IsNull (arrRound1(3,1)) Then
 arrRound1(3,1) = "None"
 Response.Write(arrRound1)
 End If%>

Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 9:07pm

Thats because you used Response.Write(arrRound1), not Response.Write(arrRound1(3,1)).

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 9:09pm

I changed it to this right after posting that:

If (arrRound1(3,1)) = "" Then
arrRound1(3,1) = "None"
Else
Response.Write(arrRound1(3,1))
End If

 

Still does not work ...

Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 9:10pm
I get an object out of range error ...
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 9:15pm
How many rows are in the recordset? How many columns?
The first number in the array represents the column you want to display. The second number the row. Remember that arrays begin with 0, so the first olumn in the first row would be arrayName(0,0).
Back to Top
b_bonnett View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Location: New Zealand
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote b_bonnett Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 9:18pm

Comment out that code and put the following in there:

Response.Write "Array Dimensions: " & UBound(arrRound1) & " x " & UBound(arrRound1, 2)

Then post what it says here.

Blair

Webmaster, The Plane Gallery
Greetings From Christchurch
Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 9:18pm

Their is only one row in the recordset and five columns.  In literal the column I want to use is number four which means it's number three here.

So displaying arrRound1(3,0) works fine because their is one row.

Displaying arrRound1(3,1) does not because there is no "second" row.

So I want to put some IF statements to display something else so the page continues.

Back to Top
 Post Reply Post Reply Page  <1234 5>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.