Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 December 15th, 2003, 12:14 PM
ppenn
Guest
 
Posts: n/a
Default Microsoft VBScript runtime (0x800A0009)

Hi everyone
I am developing an Intranet application, using asp connect to SQL server 2000, the asp file runs with an error message of

Microsoft VBScript runtime (0x800A0009)
Subscript out of range: '[number: 1]'
/customers/contactlist.asp, line 21

Code:

<%
  Dim eUser, rsCheckListRole
  eUser=split(Request.ServerVariables("logon_user"), "/")

 set rsCheckListRole=con.execute("sp_GetListUser "&eUser(1)) line 21

Any help will be very much approciated

thanks in advance
Peter


 
Old December 15th, 2003, 01:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

The 'subscript out of range' error means that the index (1) is higher than the upper bound of the array - in this case it means that there is no / in request.servervariables("logon_user")...

You might want to check for this:
Code:
if ubound(eUser) > 0 then
   set rsCheckListRole=con.execute("sp_GetListUser " & eUser(1))
else
   response.write "Some error message"
   response.end
end if
 
Old December 15th, 2003, 01:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

The response.end in the above code might be a bit premature - you'll want to close the db-connection aso. - but you know what I mean...






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 (0x800A01B6) texasraven Classic ASP Basics 24 June 24th, 2004 06:22 AM





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