This topic is locked

Error 800a0005

6/12/2005 9:02:29 AM
ASPRunnerPro General questions
jmisson author

Hi,
I have am using the latest version of ASPRunner and am getting the following error.
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Mid'
/qryNotes2_list.asp, line 249
This only occurs if I log on as anyone other than Admin (the login that can view everything).
This is the code that is causing the trouble:
if strMasterKey <> "" then

n1 = InStr(LCase(strSQL), " where ")

n2 = InStr(LCase(strSQL), " order by ")

n3 = InStr(strSQL, "[EnquiryFK] = " & strMasterKey)

if n3 = 0 then

if n1>0 then

if n2>0 then

strSQL = Left(strSQL,n1) & " where (" + Mid(strSQL, n1 + len(" where "), n2-n1-len(" where ")) + ") and [EnquiryFK] = " & strMasterKey & Mid(strSQL, n2 )

else

strSQL = Left(strSQL,n1) & " where (" + Mid(strSQL, n1 + len(" where ")) & ") and [EnquiryFK] = " & strMasterKey

end if

else

if n2>0 then

strSQL = Left(strSQL,n2) & " where [EnquiryFK] = " & strMasterKey & Mid(strSQL, n2 )

else

strSQL = strSQL & " where [EnquiryFK] = " & strMasterKey

end if

end if

end if

end if
Many thanks
Julie

Admin 6/14/2005

Hi,
Please zip and send to support@xlinesoft.com all files from ASPRunnerPro output folder with subfolders along with project file and your sample database. I'll find what's wrong running it on my test box.

J
JAT 7/13/2006

I am generating the same error (using version 4.0, Build 92). Is there something I can do to fix this? The page loads and I can see most of the first row of data with the exception of the field that displays the error, no records appear after the error field.
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Mid'
/Fall2006Training/include/commonfunctions.asp, line 493
Many Thanks!
J

J
Jane 7/14/2006

Please zip and send to support@xlinesoft.com all files from ASPRunnerPro output folder with subfolders along with project file and your sample database. I'll find what's wrong running it on my test box.

J
JAT 1/8/2007

Greetings!
I'm getting this error again on a project with 4.1 build 195. When I click on the link for Printer-friendly page I get:
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'mid'
/jtgoebel_co_sanmateo_ca_us/TD_Sp2007/include/commonfunctions.asp, line 461
or sometimes I get:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
/hr/training/Spring2007/include/commonfunctions.asp, line 1306
It seems to be happening consistently (one error or the other), but only on certain sections of my site (SAFETY_print.asp, WebNonprofits_print.asp) which makes me think it is something I did to those pages...but I can't find the problem! I've uploaded to the demo server; http://demo.asprunner.net/jtgoebel%5Fco%5F...Sp2007/menu.asp
I don't have anything in my email archive to clue me in to the fix from last time. Can you take a look and let me know what is going on? Thanks!

J
Jane 1/9/2007

Hi,
thank you for pointing me to this bug.

We'll fix it in the next ASPRunnerPro update.
To make your pages working please open source\inlude\commonfunctions.asp file, find following code snippet:

If Mid(ret, Len(ret)) = "#" Then

i = InStr(1, ret, "#")

title = Mid(ret, 1, i - 1)

link = Mid(ret, i + 1, Len(ret) - i - 1)

If title = "" Then title = link

End If

and replace it with this one:

If Mid(ret, Len(ret)) = "#" Then

i = InStr(1, ret, "#")

if i<len(ret) then

title = Mid(ret, 1, i - 1)

link = Mid(ret, i + 1, Len(ret) - i - 1)

If title = "" Then title = link

end if

End If



Then rebuild your pages.