I was building a function to work through a string and return the Ascii
equivalent (inline):
function convertString(strText)
Dim intI, strFake, chrThis, intThis, strThem
strFake = ""
chrThis = ""
For intI = 0 To len(strText) -1
chrThis = Mid(strText, intI, 1)
intThis = Asc(chrThis)
strThem = CStr(intThis)
strFake = strFake & chrThis & "[" & strThem & "]"
Next
convertString = strFake
end function
but I get the classic:
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Mid'
error from the server.
The server is a vanilla NT4SP5 using IIS4. I have no idea what IIS service
packs have been applied, though I'm about to work through all the security
patches I can find...
Any clues people?
Later'ish
Craig
Marius Krogh
"Craig Humphrey" <Craig.H...@ChapmanTripp.co.nz> wrote in message
news:ILGr5.2164$eZ8a.1...@news.xtra.co.nz...
VBScript indexes strings from 1, not zero, so
Mid( <String>, 0, 1 )
might upset it a little.
Change the loop to
For intI = 1 To Len(strText)
HTH,
Phill W.
Craig Humphrey wrote:
> Hi,
> either I'm doing something fundamentally wrong, or Mid() and Asc() are not
> available in ASP pages.
> . . .
Thanks... I'm too used to C/C++ and JavaScript...
Later'ish
Craig
"Marius Krogh" <ma...@online.no> wrote in message
news:8onki1$a94$1...@oslo-nntp.eunet.no...
Thanks... I'm too used to C/C++ and JavaScript...
Later'ish
Craig
"Phillip Ward" <Philli...@tesco.net> wrote in message
news:39AF97A3...@tesco.net...