Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-11-2005, 05:10 PM   PM User | #1
NancyJ
Senior Coder

 
NancyJ's Avatar
 
Join Date: Feb 2005
Location: Bradford, UK
Posts: 3,162
Thanks: 19
Thanked 65 Times in 64 Posts
NancyJ will become famous soon enough
Invalid procedure call or argument: 'mid'

Code:
names = mid(names, 0, len(names)-2)
names = fldQuantity, fldSize, fldProductID,
len(names)-2) returns 34
but I get: Invalid procedure call or argument: 'mid'
__________________
http://www.hazelryan.co.uk
NancyJ is offline   Reply With Quote
Old 08-11-2005, 06:11 PM   PM User | #2
SpirtOfGrandeur
Regular Coder

 
Join Date: May 2005
Location: Michigan, USA
Posts: 566
Thanks: 0
Thanked 0 Times in 0 Posts
SpirtOfGrandeur is an unknown quantity at this point
You have another variable on the page using mid... I usually get caught on it when getting a menu ID... which i usualy call mID in the db... so i call it as that on the page and all hell breaks loose...
__________________
Note: I do not test code. I just write it off the top of my head. There might be bugs in it! But if any thing I gave you the overall theory of what you need to accomplish. Also there are plenty of other ways to accomplish this same thing. I just gave one example of it. Other ways might be faster and more efficient.
SpirtOfGrandeur is offline   Reply With Quote
Old 08-11-2005, 08:38 PM   PM User | #3
neocool00
Regular Coder

 
Join Date: Sep 2004
Posts: 152
Thanks: 0
Thanked 0 Times in 0 Posts
neocool00 is an unknown quantity at this point
@NancyJ
I am assuming you want names without the last two characters. If so, you can do either of the two:

1) names = left(names, len(names)-2)
or
2) names = mid(names, 1, len(names)-2)

If you are using the mid function and you set the start position to 0, it will error out with the error you posted.
neocool00 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:34 AM.


Advertisement
Log in to turn off these ads.