Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 Subscript out of range error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rapidlaw
Starting Member

5 Posts

Posted - December 09 2005 :  12:49:27  Show Profile  Reply with Quote
Hello, I've been adding fields to a custom table today, a table which has caused no problems in the past, but now, when I pull a report which includes fields from that table I get the error:

quote:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'i'
/shop/shopfileio.asp, line 787


I've gone to that line and it is in this section:

quote:
Sub GetFieldValues (RS, fieldnames, fieldvalues, fieldtypes, fieldcount)
Dim i
dim fldname
i=0
' memo fields must be gotten first
For each fldName in RS.Fields
fieldnames(i) = ucase(fldname.name)
fieldTypes(i) = fldname.type
If Fieldtypes(i)="201" then
fieldvalues(i)=RS(i)
end if


Line 787 is this one: "fieldnames(i) = ucase(fldname.name)"

Other posts speak to similar errors, but I'm not certain what to increase here as I'm not too good at code.

Can anyone help me,

Thanks,

Bruce

devshb
Senior Member

United Kingdom
1904 Posts

Posted - December 10 2005 :  16:01:26  Show Profile  Visit devshb's Homepage  Reply with Quote
Too many template fields are in the template; you'd just need to increase the size of the array definitions in shopfileio.asp:

change these definitions which are in shopfileio.asp:

(in Sub ShopTemplateArray) :
redim fieldnames(100)
redim fieldvalues(100)
redim fieldtypes(100)

to:
redim fieldnames(1000)
redim fieldvalues(1000)
redim fieldtypes(1000)

(in Sub ShopTemplateWrite) :
redim fieldnames(150)
redim fieldvalues(150)
redim fieldtypes(150)

to:
redim fieldnames(1000)
redim fieldvalues(1000)
redim fieldtypes(1000)

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

rapidlaw
Starting Member

5 Posts

Posted - December 13 2005 :  04:17:17  Show Profile  Reply with Quote
Thanks Simon, works great!
Go to Top of Page

go4gold
VP-CART New User

151 Posts

Posted - July 30 2007 :  13:06:30  Show Profile  Visit go4gold's Homepage  Reply with Quote
Hi,
I am getting an error message when I try to send my first newsletter and hope there is an easy fix. I have forwarded this old post as I think it could be a related problem. I started off with the same error message as in the old post and after I made the changes suggested by Simon, my error message changed to:

Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'readcount'
/shopping/shopfileio.asp, line 224

I have saved my newsletter as a tmp_newsletter.htm file and am typing this into the "file name" field. Interestingly, if I paste the same HTML code directly into the message area of the site then this was being delivered ok (except that no images were included).

Has anyone got any ideas what I am doing wrong please? I'd be very grateful for any help. Many thanks.

Regards,

Go4Gold
Go to Top of Page

go4gold
VP-CART New User

151 Posts

Posted - July 31 2007 :  02:07:17  Show Profile  Visit go4gold's Homepage  Reply with Quote
Hi,
Just a quick update in case the error messages are linked:

(a) I get the error message stated previously if I use the file name field and set "merge with database" to YES;

(b) if I do everything the same but set "merge with database" to NO, then I get the error message below:

Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'i'
/shopping/shopa_mail.asp, line 273

(c) if I paste the same HTML into the message box instead of using the file name, and "merge with database" set to YES, then I get:

Cannot read
Mailing toLeigh Salkeld [email protected]

(d) if I repeat (c) but set "merge wih database" to NO then the email gets sent fine (i've sorted the images not displaying now)

Thanks for any help.

Regards,

Go4Gold
Go to Top of Page

fflores
Starting Member

12 Posts

Posted - July 07 2009 :  10:33:34  Show Profile  Reply with Quote
I am having the same issue but on a diffferent page:

error '800a0009'

Subscript out of range: 'i'

/cart/shopa_addproduct.asp, line 1838


Any ideas?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00