PDA

View Full Version : ASP Error in VBScript Functions


midnightswan
06-04-2003, 08:39 PM
Hi,

I was hoping someone can explain to me why I'm getting this error message
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'Left'


Left is a valid function in the VBscript library...I don't understand why it's screwing up. I'm using the same function in another part of my code and it's screwing up in this one file but not in this other file. I've also added the:
<% @LANGUAGE="VBSCRIPT" %>
at the top and that makes no difference either. :confused:

I know that if I somehow magically clear this error I will get the same one when I call 'Right' :cry:

I hope someone can help me. I'd really appreciate it.

Thanking you,
MS

Lety
06-05-2003, 12:47 AM
Originally posted by midnightswan
Invalid procedure call or argument: 'Left'


Are you forgetting the () by chance? left()

midnightswan
06-05-2003, 05:12 AM
No I didn't forget to put the () in after the Left.

Thanks for trying to help. I did figure it out tho. It was a matter of rearranging the ASP code to execute all at the same place inbetween the html code : o)

Whitesword
06-06-2003, 09:03 PM
Any chance of posting the section which is screwing you up... usually its a typo and you could look for hours and not see it, while someone here could :)

jsawkang
06-07-2003, 12:04 AM
yeah. i agree with Whitesword.

like for example

str=LEFT(Time(Date), 4)

Frank
06-07-2003, 12:12 AM
Originally posted by jsawkang
yeah. i agree with Whitesword.

like for example

str=LEFT(Time(Date), 4)

Which should be:

str = Left(Time, 4) ' to get the left 4 characters of the time

Or:

str = Left(Date, 4) 'to get the left 4 characters of the date


:D