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