Languages :: ASP :: VBS :: Microsoft VBScript runtime error '800a0009' |
|||
| By: cosmopolita |
Date: 03/10/2003 00:00:00 |
Points: 125 | Status: Answered Quality : Excellent |
|
Dear EXperts Could y pls tell me why I get the following error: Microsoft VBScript runtime error '800a0009' Subscript out of range: 'i' /add.asp, line 43 Code: <html> <head> <title>PW99 MiniShop</title> </head> <body> <% id = request.querystring("id") items = request.querystring("items") maler = request.querystring("maler") bildname = request.querystring("bildname") anfertigung = request.querystring("anfertigung") breite = request.querystring("breite") hoehe = request.querystring("hoehe") preis = request.querystring("preis") rahmen = session("idframe") passpartout = session("idpass") passpartoutbreite = session("passpartoutbreite") response.write("Session items:" & session("items")) if isempty(session("warenkorb")) then dim warenkorb(100,10) session("items")=-1 session("warenkorb") = warenkorb i = -1 else i = session("items") warenkorb = session("warenkorb") end if if len(id)>0 and len(items)>0 then if items>0 and i <100 then i = i + 1 response.write "Manfred hier ......." & i warenkorb(i,0) = items warenkorb(i,1) = maler warenkorb(i,2) = bildname warenkorb(i,3) = anfertigung warenkorb(i,4) = breite warenkorb(i,5) = hoehe warenkorb(i,6) = preis warenkorb(i,7) = rahmen <= This is line 43 warenkorb(i,8) = passpartout warenkorb(i,9) = passpartoutbreite session("items") = i session("warenkorb") = warenkorb Erase warenkorb end if end if frame=session("idframe") pass=session("idpass") wohin="target=RightFrame" Response.Write("<script>") Response.Write("parent.content.location.href='frameset.asp?id=" &id& " &idframe=" & frame & "&idpass=" & pass & "'") Response.Write("</script>") ' ' parent.content.location.reload(); %> </body> </html> |
|||
| By: VGR | Date: 03/10/2003 15:54:00 | Type : Comment |
|
| well, clearly, session("warenkorn") has only 6 elements defined in the second dimension for the printed out i on the "Manfred hier..;" line :D |
|||
| By: cosmopolita | Date: 04/10/2003 20:33:00 | Type : Comment |
|
| Dear VGR pls forget this line: response.write "Manfred hier ......." & i I've only put it in when I started to see if or not I was in the if ... end if When I started the program this morning it all worked fine a) add.asp (where the artikel is added = above listing) b) warenkorb.asp (which is the shopping-cart) c) send.asp (to send it) Than suddenly the same error in 'add.asp' and 'send.asp'. I have the feeling that the above "dim warenkorb (100,10)" gets changed to "dim warenkorb(100,6)" and I have the feeling that you have seen it :-)) B Rgds Manfred |
|||
| By: cosmopolita | Date: 04/10/2003 20:35:00 | Type : Comment |
|
| Dera VGR BTW: As we are in touch again I can add the other 125 points here later :-)) B Rgds Manfred |
|||
| By: VGR | Date: 04/10/2003 20:43:00 | Type : Answer |
|
| then - I don't know VBScript well - I suggest you do on top of this page what in PHP i would write as : echo '<pre>'; // ensures formatting is readable print_r(warenkorb); // dump the array recursively echo '</pre>'; this way you can start guessing why and where the problem occurs |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








