- Remove From My Forums
Microsoft VBScript runtime error ‘800a0005’ — Invalid procedure call or argument: ‘MidB’
-
Question
-
User770039553 posted
Hi, we use a VBscript/Classic ASP function to upload attachments to a web application. Since KB3104002 has been implemented this now fails with :
Microsoft VBScript runtime error ‘800a0005’
Invalid procedure call or argument: ‘MidB’
If the Windows Update is removed then it functions as expected. An example of the line which is failing is below :
vDataBounds = MidB(biData, nPosBegin, nPosEnd-nPosBegin)
It would look like the MidB function has somehow been removed.
Can anyone advise on a solution to the issue.
Many thanks, Scott
Answers
-
User-823319154 posted
Hi Scott,
It is reported that KB3104002 update may
be the reason that some classic ASP applications may not work correctly.You can try the
Hotfix
or you can uninstall the KB3104002 update.Please let me know if you need any other help.
Best regards,
Angie
-
Marked as answer by
Tuesday, September 28, 2021 12:00 AM
-
Marked as answer by
-
-
Marked as answer by
Anonymous
Tuesday, September 28, 2021 12:00 AM
-
Marked as answer by
- Remove From My Forums
-
General discussion
-
I’ve created a VBScript that aims to change folder share names on a server. This is currently running as a logon script for my test users.
I’ve defined this function:
Private Function intChangeShareName() Dim intPoz1, intPoz2, intIndex Dim strPom intChangeShareName = CONST_NO_CHANGE strActions = strActions & strOldNameShare & vbcrlf strPom = Trim(strOldNameShare) If Left(strPom, 2) <> "\" then Exit Function intPoz1 = inStr(3, strPom, "") intPoz2 = inStr(3, strPom, ".") If intPoz2 > 0 Then strSrvName = Mid(strPom, 3, intPoz2 - 3) strDomName = Mid(strPom, intPoz2 + 1, intPoz1 - intPoz2 - 1) Else strSrvName = Mid(strPom, 3, intPoz1 - 3) strDomName = "" End If intIndex = 0 Do while intIndex <= UBound(arrOldSrv) If UCase(strSrvName) = UCase(arrOldSrv(intIndex)) Then If strDomName = "" Then strNewNameSrv = arrNewSrv(intIndex) strNewNameDom = "" intChangeShareName = CONST_CHANGE End If If UCase(strDomName) = UCase(arrOldDom(intIndex)) Then strNewNameSrv = arrNewSrv(intIndex) strNewNameDom = "." & arrNewDom(intIndex) intChangeShareName = CONST_CHANGE End If End If intIndex = intIndex + 1 Loop If intChangeShareName = CONST_CHANGE Then strNewNameShare = "\" & strNewNameSrv & strNewNameDom & Mid(strPom, intPoz1) strActions = strActions & "* " & strNewNameShare & vbcrlf blRequireLogoff = True ' Wscript.Echo "a " & strNewNameShare End If End Function
However every time I log in I get the following error: VBScript runtime error — Invalid procedure call or argument: ‘Mid’ — Code 800A0005
I don’t see anything wrong with my Mid function, can someone please help me?
-
Changed type
Thursday, February 2, 2017 7:59 PM
-
Moved by
Bill_Stewart
Thursday, February 2, 2017 7:59 PM
This is not «fix/debug/rewrite my script for me» forum
-
Changed type
Trying to Generate .html report fails on line 67 (default.htm) |
|
mdeninno@sonic.net |
|
Forum Newbie Forum Members |
I’m receiving this error when trying to publish .html report. I had done it years ago with an older version of genopro (link) with no problem. Wanted to update with newer info and using newer version of genopro doesn’t work It was the ONLY reason I just spent $49 to buy this product. Any help is appreciated! Generating report to ‘C:UsersMichaelDocumentsGenoPro ReportsForWeb’ Error at line 67 (default.htm): Invalid procedure call or argument: ‘[string: «(null)»]’ Tags: VBScript Error 800A0005 html report |
mdeninno@sonic.net |
|
Forum Newbie Forum Members |
I’m sorry, I did the search through the Forum, but initially didn’t find any answers. A more thorough search produced a solution to this immediate problem, something about the skins and putting into a separate directory. So now it seems to generate the report, but there is no .html file to start «call» as there was before in my example link above. Does anyone know which file is the new one that would replace «…index.html» above? |
appleshaw |
|
Grand Master Customers |
|
mdeninno@sonic.net |
|
Forum Newbie Forum Members |
Thanks so much for the help… I did verify I have the newest version and I’ve gotten past the skins issue. My issue now is I can’t find the equivalent «index.html» as in the previous versions. That is, I don’t know which .html file to include in the link on my website to call up this updated genopro file on my website. Here’s the old link with index.html. |
mdeninno@sonic.net |
|
Forum Newbie Forum Members |
p.s. Here is what I have uploaded. This might be just all too new for me and I’m behind the times? http://www.michaeldeninno.com/GenoProNew/ |
genome |
|
Legendary Master Administrators |
What you have uploaded is actually part of the Descendants Tree Chart Report and not actually the English Narrative Report which I presume you had intended to generate. Oddly some of the files look wrong for that report too. (e.g. the .rtf file is has xml content) Have you downloaded and installed the revised Narrative Report from http://support.genopro.com/Topic28332.aspx ? There is a link from that topic detailing how to install it correctly. Once installed make sure you select this revised report when generating your HTML report.
‘lego audio video erro ergo disco’ or «I read, I listen, I watch, I make mistakes, therefore I learn« |
mdeninno@sonic.net |
|
Forum Newbie Forum Members |
Thanks so much for your help. I have downloaded and installed the skin from the link in the previous post. I’m now back to square #1 again, with the original 800A0005 error |
mdeninno@sonic.net |
|
Forum Newbie Forum Members |
This time it is producing the index.html file, but when executed, it produces error «can’t find the file at …default.htm» |
genome |
|
Legendary Master Administrators |
If you are still getting error 800A0005 then you are still trying to run the built-in Narrative Report and not the downloaded updated one. I need more info to diagnose why you are getting can’t find … default.htm. After a report is generated the report skin script attempts to open the start page, default.htm (index.html merely contains a redirect to default.htm), obviously it is not finding it for some reason. If you are generating via you own FTP server then perhaps your HTTP equivalent URL is incorrect. Do you have a URL for your report I can look at? (Send via Private Message (PM) if you do not want ot make it public) Do any errors show in the GenoPro Report Log?
‘lego audio video erro ergo disco’ or «I read, I listen, I watch, I make mistakes, therefore I learn« |
haggibar |
|
Forum Newbie Customers |
Hello, It seems I’m having the same problem as the one described. what is the solution ? again I’m trying to release the updated report after few years of not using it. I downloaded the latest version and also the updated report tool. Any resolution ? Thanks, Haggai. Publishing report to http://familytrees.genopro.com/haggibar/twoFriedmannFamilies/Connecting to server familytrees.genopro.com… Cloning document Freeman-families-database-140121… Error at line 67 (default.htm): Invalid procedure call or argument: ‘[string: «(null)»]’ Microsoft VBScript runtime error 800A0005 |
All occurrences of MID
function in your code follow syntax pattern Mid(string, start[, length])
properly:
Arguments
string
String expression from which characters are returned. If string containsNull
,Null
is returned.start
Character position in string at which the part to be taken begins. If start is greater than the number of characters in string,
Mid returns a zero-length string (""
).length
Number of characters to return. If omitted or if there are fewer than length characters in the text (including the character at
start), all characters from thestart
position to the end of the
string are returned.
Excerpted from the original code snippet, variables renamed merely for clearness:
iPosBackSlash = inStr(3, strPom, "")
iPosDot = inStr(3, strPom, ".")
If iPosDot > 0 Then
strSrvName = Mid(strPom, 3, iPosDot - 3)
strDomName = Mid(strPom, iPosDot + 1, iPosBackSlash - iPosDot - 1)
Else
strSrvName = Mid(strPom, 3, iPosBackSlash - 3)
strDomName = ""
End If
''' and thereinafter '''
strNewNameShare = "\" & strNewNameSrv & strNewNameDom & Mid(strPom, iPosBackSlash)
On the other side, MID
function would fail raising terminating error Invalid procedure call or argument: 'Mid' - Code 800A0005
if start
or length
are out of range.
Let’s consider some valid UNC paths as possible values of strPom
variable:
\serverroot
,\serverrootsub
,\server.domainroot
,\server.domainrootsub
: the original function would not fail,- but for instance
\serverrootsub.folder
raises error in question as specifiedlength
i.e.iPosBackSlash - iPosDot - 1
results to a negative number.
If (iPosDot > 0) and (iPosDot < iPosBackSlash) Then
should resolve the latter issue although someone could find a valid UNC path such that iPosDot - 3
or iPosBackSlash - 3
would lead to the error?
Answer, returned to original variable names, use next improved If
command:
If intPoz2 > 0 and (intPoz2 < intPoz1) Then
''' etc '''