Active Server Pages

Moderators: None (Apply to moderate this forum)
Number of threads: 1763
Number of posts: 4498

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Help with code error please, urgent Posted by Confused19 on 13 May 2006 at 8:59 AM
I am getting a vbscript run time error 800a009 subscript out of range '[number7]'. I bought the program and cannot figure out how to fix this. It refers to this piece of code

<%dim pstoty
dim pstype(6)
pstoty=objRS1("property")

pstype(pstoty)="selected"
%>
<select name=type>
<option value="1" <%response.write(pstype(1))%>>APARTMENT</option>
<option value="2" <%response.write(pstype(2))%>>VILLA</option>
<option value="2" <%response.write(pstype(2))%>>VILLA</option>
<option value="3" <%response.write(pstype(3))%>>RESTAURANT</option>
<option value="4" <%response.write(pstype(4))%>>HOTEL</option>
<option value="5" <%response.write(pstype(5))%>>BAR</option>
<option value="6" <%response.write(pstype(6))%>>BUSINESS</option>
<option value="7" <%response.write(pstype(7))%>>LAND</option>
<option value="8" <%response.write(pstype(8))%>>PROJECT</option> </select>

It runs fine up to 6 and then I get the error.

This is what is on the page it is supposed to work on, but I cant see why it doesnt work

<span><br>
</span><span>Select to type of property such as Apartment, Villa, Land.</span></font></td>
</tr>
<tr>
<td align=right bgcolor="#ffffff" valign=top width="127"><div align="left"></div></td>
<td align=left bgcolor="#ffffff" width="402">&nbsp;</td>
</tr>

<tr>
<td align=right bgcolor="#FFF7F0" valign=top width="127"><div align="left"></div></td>

Any assistance would be very much appreciated as I am totally stuck and going nuts.

Many thanks

Cassie
Report
Re: Help with code error please, urgent Posted by casio-games.tk on 13 May 2006 at 12:33 PM
This message was edited by casio-games.tk at 2006-5-13 12:35:31

: I am getting a vbscript run time error 800a009 subscript out of range '[number7]'. I bought the program and cannot figure out how to fix this. It refers to this piece of code
:
: <%dim pstoty
: dim pstype(6)
: pstoty=objRS1("property")
:
: pstype(pstoty)="selected"
: %>
: <select name=type>
: <option value="1" <%response.write(pstype(1))%>>APARTMENT</option>
: <option value="2" <%response.write(pstype(2))%>>VILLA</option>
: <option value="2" <%response.write(pstype(2))%>>VILLA</option>
: <option value="3" <%response.write(pstype(3))%>>RESTAURANT</option>
: <option value="4" <%response.write(pstype(4))%>>HOTEL</option>
: <option value="5" <%response.write(pstype(5))%>>BAR</option>
: <option value="6" <%response.write(pstype(6))%>>BUSINESS</option>
: <option value="7" <%response.write(pstype(7))%>>LAND</option>
: <option value="8" <%response.write(pstype(8))%>>PROJECT</option> </select>
:
: It runs fine up to 6 and then I get the error.
:
: This is what is on the page it is supposed to work on, but I cant see why it doesnt work
:
: <span>
: </span><span>Select to type of property such as Apartment, Villa, Land.</span></font></td>
: </tr>
: <tr>
: <td align=right bgcolor="#ffffff" valign=top width="127"><div align="left"></div></td>
: <td align=left bgcolor="#ffffff" width="402">&nbsp;</td>
: </tr>
:
: <tr>
: <td align=right bgcolor="#FFF7F0" valign=top width="127"><div align="left"></div></td>
:
: Any assistance would be very much appreciated as I am totally stuck and going nuts.
:
: Many thanks
:
: Cassie
:


I dont know this language at all but i think the problem is :
<%dim pstoty
dim pstype(6)
pstoty=objRS1("property")

pstype(pstoty)="selected"
%>


dim pstype(6) should set set the dimension of "pstype" to 6, and thats propably why it stops working at 7. Try to change it to dim pstype(8):

<%dim pstoty
dim pstype(8)
pstoty=objRS1("property")

pstype(pstoty)="selected"
%>


If you have bought this program, it is REALLY bad with such a simple but fatal error.



Don't write pH, write Ph!

<!--WARNING: Walla mail don't work!-->



Report
Re: Help with code error please, urgent Posted by Confused19 on 14 May 2006 at 4:49 AM
: This message was edited by casio-games.tk at 2006-5-13 12:35:31

: : I am getting a vbscript run time error 800a009 subscript out of range '[number7]'. I bought the program and cannot figure out how to fix this. It refers to this piece of code
: :
: : <%dim pstoty
: : dim pstype(6)
: : pstoty=objRS1("property")
: :
: : pstype(pstoty)="selected"
: : %>
: : <select name=type>
: : <option value="1" <%response.write(pstype(1))%>>APARTMENT</option>
: : <option value="2" <%response.write(pstype(2))%>>VILLA</option>
: : <option value="2" <%response.write(pstype(2))%>>VILLA</option>
: : <option value="3" <%response.write(pstype(3))%>>RESTAURANT</option>
: : <option value="4" <%response.write(pstype(4))%>>HOTEL</option>
: : <option value="5" <%response.write(pstype(5))%>>BAR</option>
: : <option value="6" <%response.write(pstype(6))%>>BUSINESS</option>
: : <option value="7" <%response.write(pstype(7))%>>LAND</option>
: : <option value="8" <%response.write(pstype(8))%>>PROJECT</option> </select>
: :
: : It runs fine up to 6 and then I get the error.
: :
: : This is what is on the page it is supposed to work on, but I cant see why it doesnt work
: :
: : <span>
: : </span><span>Select to type of property such as Apartment, Villa, Land.</span></font></td>
: : </tr>
: : <tr>
: : <td align=right bgcolor="#ffffff" valign=top width="127"><div align="left"></div></td>
: : <td align=left bgcolor="#ffffff" width="402">&nbsp;</td>
: : </tr>
: :
: : <tr>
: : <td align=right bgcolor="#FFF7F0" valign=top width="127"><div align="left"></div></td>
: :
: : Any assistance would be very much appreciated as I am totally stuck and going nuts.
: :
: : Many thanks
: :
: : Cassie
: :
:
:
: I dont know this language at all but i think the problem is :
:
<%dim pstoty
: dim pstype(6)
: pstoty=objRS1("property")
: 
: pstype(pstoty)="selected"
: %>
: 

:
: dim pstype(6) should set set the dimension of "pstype" to 6, and thats propably why it stops working at 7. Try to change it to dim pstype(8):
:
:
<%dim pstoty
: dim pstype(8)
: pstoty=objRS1("property")
: 
: pstype(pstoty)="selected"
: %>
: 

:
: If you have bought this program, it is REALLY bad with such a simple but fatal error.
:


: Don't write pH, write Ph!
:
: <!--WARNING: Walla mail don't work!-->
:
:
:
:

Report
Re: Help with code error please, urgent Posted by Confused19 on 14 May 2006 at 4:52 AM
Hi, many many thanks. You have saved my hair, a lot of which was pulled out. What a simple thing when you see it to cause such a problem. You are right about the program have had so many problems with it, most of which I figured out eventually but couldnt figure this one out. Just one more prob left and then I will be able to work with it ok.

Again, many many thanks

Cassie




: : This message was edited by casio-games.tk at 2006-5-13 12:35:31

: : : I am getting a vbscript run time error 800a009 subscript out of range '[number7]'. I bought the program and cannot figure out how to fix this. It refers to this piece of code
: : :
: : : <%dim pstoty
: : : dim pstype(6)
: : : pstoty=objRS1("property")
: : :
: : : pstype(pstoty)="selected"
: : : %>
: : : <select name=type>
: : : <option value="1" <%response.write(pstype(1))%>>APARTMENT</option>
: : : <option value="2" <%response.write(pstype(2))%>>VILLA</option>
: : : <option value="2" <%response.write(pstype(2))%>>VILLA</option>
: : : <option value="3" <%response.write(pstype(3))%>>RESTAURANT</option>
: : : <option value="4" <%response.write(pstype(4))%>>HOTEL</option>
: : : <option value="5" <%response.write(pstype(5))%>>BAR</option>
: : : <option value="6" <%response.write(pstype(6))%>>BUSINESS</option>
: : : <option value="7" <%response.write(pstype(7))%>>LAND</option>
: : : <option value="8" <%response.write(pstype(8))%>>PROJECT</option> </select>
: : :
: : : It runs fine up to 6 and then I get the error.
: : :
: : : This is what is on the page it is supposed to work on, but I cant see why it doesnt work
: : :
: : : <span>
: : : </span><span>Select to type of property such as Apartment, Villa, Land.</span></font></td>
: : : </tr>
: : : <tr>
: : : <td align=right bgcolor="#ffffff" valign=top width="127"><div align="left"></div></td>
: : : <td align=left bgcolor="#ffffff" width="402">&nbsp;</td>
: : : </tr>
: : :
: : : <tr>
: : : <td align=right bgcolor="#FFF7F0" valign=top width="127"><div align="left"></div></td>
: : :
: : : Any assistance would be very much appreciated as I am totally stuck and going nuts.
: : :
: : : Many thanks
: : :
: : : Cassie
: : :
: :
: :
: : I dont know this language at all but i think the problem is :
: :
<%dim pstoty
: : dim pstype(6)
: : pstoty=objRS1("property")
: : 
: : pstype(pstoty)="selected"
: : %>
: : 

: :
: : dim pstype(6) should set set the dimension of "pstype" to 6, and thats propably why it stops working at 7. Try to change it to dim pstype(8):
: :
: :
<%dim pstoty
: : dim pstype(8)
: : pstoty=objRS1("property")
: : 
: : pstype(pstoty)="selected"
: : %>
: : 

: :
: : If you have bought this program, it is REALLY bad with such a simple but fatal error.
: :


: : Don't write pH, write Ph!
: :
: : <!--WARNING: Walla mail don't work!-->
: :
: :
: :
: :
:
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.