Solved

Type Mismatch while using Split on an array...???

Posted on 2006-11-13
2
394 Views
Last Modified: 2012-06-27
I've got some values stored in an array like so:

CustomInformation = 555-555-5555 | FedEx Ground | de | 123

I'm trying to get each piece into its own variable so I used Split:

Split(CustomInformation = 555-555-5555 | FedEx Ground | de | 123,"|")

Then, if I go ahead and print these values to the screen it works fine:

Response.Write(CustomInformationSplit(0) & "<br>" & CustomInformationSplit(1) & "<br>" & CustomInformationSplit(2) & "<br>" & CustomInformationSplit(3))

However, when I try and simply populate a new variable with the value of the first array value, the phone number, I'm getting a type mismatch error.

billingPhoneNumber = CustomInformation(0)

returns

Microsoft VBScript runtime  error '800a000d'
Type mismatch: 'CustomInformation'

I'm guessing it must be something to do with the -'s?  Is it trying to subtract 555 from 555 from 555?  How do I make this work?  Any information would be greatly appreciated.  thanks!
0
Comment
Question by:Andrew Angell
2 Comments
 
LVL 18

Accepted Solution

by:
Morcalavin earned 250 total points
ID: 17932273
I thought your array  name was CustomInformationSplit, but here you have:
billingPhoneNumber = CustomInformation(0)

Should be:
billingPhoneNumber = CustomInformationSplit(0)

Split should be
CustomInformationSplit = Split(YourData, "|")
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 17932632
Well write moron on my forehead.  You got it!  thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now