Author |
Topic |
|
jackbox
VP-CART New User
United Kingdom
72 Posts |
Posted - April 07 2006 : 03:43:52
|
When I import a comma separated text file I get:
Importing - import/categories.txt Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'index'
/shopa_import.asp, line 140 What am I doing wrong?
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - April 07 2006 : 07:33:23
|
I don't think you're doing anything wrong; it looks like it's simply run out of array space if you edit shopa_import.asp, try changing the instances of (200) to (2000)
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
|
|
jackbox
VP-CART New User
United Kingdom
72 Posts |
Posted - April 07 2006 : 09:32:31
|
Thank you Simon :) |
|
|
rory
Starting Member
18 Posts |
Posted - February 14 2007 : 19:43:53
|
I'm getting the same error. Either importing .txt (comma separated) or .csv
Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'index'
/shopa_import.asp, line 143
I tried increasing (200) to (2000) as suggested elsewhere, and also tried the solution here: http://www.bigyellowzone.com/support/issue_view.asp?ID=442&CATE=8
Any help appreciated. btw, I'm only importing 12 items |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - February 15 2007 : 03:08:05
|
try viewing the import file in wordpad, as that'll (I think) show newline characters which I don't think notepad will (or vice-versa; I can't remember offhand) - if you see it spill-over to a separate line mid-record (either in notepad or wordpad) then that might be the problem.
otherwise it's probably a case of just adding some debug messages into the import to see what's going on with the fields/records as they get processed to see if you can spot anything strange.
if you're on sqlserver then it might be due to the dreaded microsoft record-size-restriction/bug, but that's another/long story!
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
|
|
rory
Starting Member
18 Posts |
Posted - February 15 2007 : 20:05:04
|
Tried opening in a text editor, and lines are definitely formatted correctly. For this test I only have 12 lines, and that's all I see in text editor. Support sent me an Excel macro to make sure it was correctly delimited.
Here's the latest: I discovered some commented debug logic in shopa_import.asp Round about line 525 in my file. Commenting out the db writes and printing out values, I found that my "expanded description" fields were breaking the script on commas. Not all commas caused problems, but some for some reason caused the script to break in the middle of the field. I've double and triple checked the .csv file, and these fields are definitely properly delimited with a " at either end and comma between fields. As a quick fix, I did a search and replace of all commas with "@@". After that, the file imported perfectly. Then I can replace the @@ with commas manually in admin. But this method is not going to work when I have a couple hundred products to import. |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
|
rvaga
VP-CART Super User
USA
254 Posts |
Posted - February 16 2007 : 20:53:22
|
Simon's freebee is well worth it, and has saved me countless headaches dealing with csv in descriptions and extended descriptions. TAB eliminates most of the issues found in everyday text. |
|
|
|
Topic |
|