Solved

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

Posted on 2006-11-13
2
400 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Update field in order 21 147
Connecting to multiple databases to create a Dashboard 5 46
Asp in script 6 35
Executing a script on a timer online 5 20
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

790 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