Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime Error, Type Mismatch

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
I get this error when trying to execute the code.<br><br><FONT FACE=monospace><br>C:\Temp\Karl<br>WebSARASInstall.exe&nbsp;&nbsp;Microsoft VBScript runtime error '800a000d' <br><br>Type mismatch <br><br>/wsDianostic/default.asp, line 22 <br></font> <br><br>and this is the section of the code around line 22<br><br><FONT FACE=monospace><br>&lt;%<br>if not IsEmpty(Request.Form(&quot;Path&quot;)) then<br>&nbsp;&nbsp;set fs = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br>&nbsp;&nbsp;set Comp = CreateObject(&quot;wsDianostic.Componets&quot;)<br>&nbsp;&nbsp;dim TempVer<br>&nbsp;&nbsp;if fs.FolderExists(Request.Form(&quot;Path&quot;)) then<br>&nbsp;&nbsp;&nbsp;&nbsp;Response.Write &quot;&lt;strong&gt;&quot; & Request.Form(&quot;Path&quot;) & &quot;&lt;/strong&gt;&lt;BR&gt;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;set fsFol = fs.GetFolder(Request.Form(&quot;Path&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;set fsFiles = fsFol.Files<br>&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;Table&gt; &lt;%<br>&nbsp;&nbsp;&nbsp;&nbsp;for each File in fsFiles<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if Comp.VersionInfo(Request.Form(&quot;Path&quot;), File.name,TempVer) then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;TR&gt; &lt;%<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;TD&gt; &lt;%=File.Name%&gt; &lt;/TD&gt; &lt;% <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for j = Lbound(TempVer) to UBound(TempVer)<br><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;TD&gt; &lt;%=TempVer(j)%&gt; &lt;/TD&gt; &lt;% </b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;/TR&gt; &lt;%<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&gt; &lt;/Table&gt; &lt;%<br>&nbsp;&nbsp;&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;&nbsp;Response.Write &quot;&lt;Font Size=+3 fgcolor=#FF0000&gt;That path does not exist&lt;/FONT&gt;&quot;<br>&nbsp;end if<br>end if<br>%&gt;</font><br><br><br><br>The VersionInfo dll, one I created, returns a Variant Array into that Result. I did make it see what the lowerbound, and upperbound was, which seemed to be the correct number of objects, but I cannot get a single element out of it due to the error. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
when I changed the line that creates the TempVer<br><br>from <br>Dim TempVer<br><br>to <br>Dim TempVer()<br><br>hoping that a Dynamic array type will be more aceptable, now I get this<br><br><br>C:\Temp\Karl<br>wsDianostic error '800a01ca' <br>Variable uses an Automation type not supported in Visual Basic <br><br>/wsDianostic/default.asp, line 18 <br>&nbsp;<br>I'll Cut/Paste the line from the dll, that returns the value perhaps that'll give some ideas.<br><br><FONT FACE=monospace><br>&nbsp;&nbsp;&nbsp;FileVerInfo = StrucVer & vbNullChar & FileVer & vbNullChar & ProdVer & vbNullChar & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FileFlags & vbNullChar & FileOS & vbNullChar & FileType & vbNullChar & FileSubType<br>&nbsp;&nbsp;&nbsp;VerInfo = Split(FileVerInfo, vbNullChar)<br></font><br><br>FileVerInfo is a local variant, then I use the split command to turn it into an array put into VerInfo(which is 'Result' from above passed in ByRef) <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
at the moment I Changed my activeX dll , so that it just returns the thing with the VbNulChar in it, and hopefully do the within the ASP, one problem is, I Cant seem to replace the ActiveX dll, IIS must have it still in use or something, but I Cant get it replaced, and I cannot restart the server under any circumstances. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Karl,<br>&nbsp;&nbsp;&nbsp;&nbsp;This probably isn't the source of your problem, but when instantiating components in ASP pages, you must use Server.CreateObject, not CreateObject.&nbsp;&nbsp;The web server/MTX can't manage the resources, otherwise.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is your progid really &quot;wsDianostic.Componets&quot;?&nbsp;&nbsp;If so, the programmer needs a spelling lesson.<br><br>&nbsp;&nbsp;<br><br> <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
aww gee thanks (I'm the programmer) and I've started using Server.CreateObject the last couple times. I remade the Dll but I Cant test it til I Can replace the old one. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
oh just wanted to mention(I use IIS4 so not my issue), with IIS 5 , you dont use Server.CreateObject. They got rid of that in IIS5 for some reason, but it was something I seen when searching through MSDN. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Thanks for the info.&nbsp;&nbsp;I'm still on IIS4 too.<br> <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top