|
-
May 14th, 2005, 08:24 AM
#1
Thread Starter
New Member
ASP Mid Function Error
Good Morning.
I am fairly new to ASP but have coded in VB, Access and Oracle before. I THOUGHT this was a basic function but ASP seems to be burping on me when I execute it. I am going to include the entire ASP page to see if there is something I am missing other than the function...
<!--#include file="../dbinclude.asp"-->
<%
Function ParseFilename(strFullPath)
dim str, i
'on error resume next
str = ""
i = Len(strFullPath)
Do Until Left(str, 1) = "\" Or Left(str, 1) = ":"
str = Mid(strFullPath, i - 1)
i = i - 1
Loop
ParseFilename = Mid(str, 2)
End Function
Conn.Execute("INSERT INTO tblPersonnel( Photo) SELECT '" & ParseFilename(request.form("image")) & "' AS Expr4, '")
%>
I am getting..
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Mid'
/membermanager/add_member.asp, line 10
On the line that says "str=Mid(strFullPath, i - 1)".
Hopefully someone can figure this out for me while I am at my son's baseball game.
Have a good morning.
Knee Deep
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|