
VBScript Eval function doesn't work properly
Sorry, I was led astray by the documentation. The V 5.5 documentation
states that ExecuteGlobal requires version 1 on it's main explanation
page (though it does say version 5 in the Version Information table.)
Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/
Quote:
> FYI - Execute and ExecuteGlobal didn't arrive until version 5.0 as well...
> --
> Michael Harris
> Microsoft.MVP.Scripting
> --
> > > I tried to use Eval function in an ASP page.
> > > This is the code I wrote (note it is at server-side):
> > > <SCRIPT LANGUAGE=vbscript RUNAT=Server>
> > > Sub Solver()
> > > dim res
> > > res = Eval ("1=0")
> > > End Sub
> > > </SCRIPT>
> > > but in my browser this message is show:
> > > Microsoft VBScript runtime error '800a000d'
> > > Type mismatch: 'Eval'
> > > /try.asp, line 17
> > > This error message doesn't appare if I call Eval function at client-side
> > > specifing RUNAT=Client in the script header.
> > > Am I in wrong?
> > > Is this a bug?
> > > Or Eval doesn't work at server-side? (I hope no... I need to use it at
> > > server-side!)
> > > (Sorry my english; it isn't good)
> > > Thanks in advance,
> > > Andrea Marchetto
> > According to the documentation, the Eval function requires version 5 of
> > the VBScript engine. My guess is that your server is running version 3
> > (the one that came with WSH v1.0). Either switch to the Execute
> > statement or update the VBScript engine on your server (if that's
> > possible).
> > Execute("res = 1=0")
> > Tom Lavedas
> > -----------
> > http://www.pressroom.com/~tglbatch/