422,764 Members | 1,289 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,764 IT Pros & Developers. It's quick & easy.

Microsoft VBScript runtime (0x800A000D) Type mismatch: '[string: "

P: n/a
Hello:

I have Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "2, 0"]'

The error happened at this line: if session("systemIdCount" &
arrSystems(iLoop)) 0

The code like this:

strSystems = session("strSystems") '' Capture SystemId Array
arrSystems = split(strSystems, ",")

iLoop = 0
For iLoop = LBound(arrSystems) to UBound(arrSystems) '' Start SystemId Array
Loop
arrSystems(iLoop) = Trim(arrSystems(iLoop))
computerCount = computerCount + 1
session("systemId" & arrSystems(iLoop)) = arrSystems(iLoop) '' Define
SystemId Session

if request.querystring("newOrder") = "true" then '' Resets Session if it is
a New Order
session("systemIdCount" & arrSystems(iLoop)) = request("systemIdCount" &
arrSystems(iLoop)) '' Define SystemId Count Session
end if

if session("systemIdCount" & arrSystems(iLoop)) 0 then '' Check if count
is grater than 0
varSysId = session("systemId" & arrSystems(iLoop))
for varItemNum = 1 to session("systemIdCount" & arrSystems(iLoop)) '
varItemNum Loop
..........

I thought that the error was that session should be int, so add cint to the
this line: if (session("systemIdCount" & arrSystems(iLoop))) 0 However, I
got mismatch "cint" error.

What am I missing here?

Your help is highly appreciated.

Oct 26 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

Snow wrote:
Hello:

I have Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "2, 0"]'

The error happened at this line: if session("systemIdCount" &
arrSystems(iLoop)) 0

The code like this:

strSystems = session("strSystems") '' Capture SystemId Array
arrSystems = split(strSystems, ",")

iLoop = 0
For iLoop = LBound(arrSystems) to UBound(arrSystems) '' Start SystemId Array
Loop
arrSystems(iLoop) = Trim(arrSystems(iLoop))
computerCount = computerCount + 1
session("systemId" & arrSystems(iLoop)) = arrSystems(iLoop) '' Define
SystemId Session

if request.querystring("newOrder") = "true" then '' Resets Session if it is
a New Order
session("systemIdCount" & arrSystems(iLoop)) = request("systemIdCount" &
arrSystems(iLoop)) '' Define SystemId Count Session
end if

if session("systemIdCount" & arrSystems(iLoop)) 0 then '' Check if count
is grater than 0
varSysId = session("systemId" & arrSystems(iLoop))
for varItemNum = 1 to session("systemIdCount" & arrSystems(iLoop)) '
varItemNum Loop
.........

I thought that the error was that session should be int, so add cint to the
this line: if (session("systemIdCount" & arrSystems(iLoop))) 0 However, I
got mismatch "cint" error.

What am I missing here?
Put a response.write in giving you the session variable that you're
trying to build

response.write(systemIdCount" & arrSystems(iLoop))

This will tell you the reason for the error.

Oct 26 '06 #2

P: n/a
Thanks for help. I put response.write, but there was nothing shown on the page

"Larry Bud" wrote:
>
Snow wrote:
Hello:

I have Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "2, 0"]'

The error happened at this line: if session("systemIdCount" &
arrSystems(iLoop)) 0

The code like this:

strSystems = session("strSystems") '' Capture SystemId Array
arrSystems = split(strSystems, ",")

iLoop = 0
For iLoop = LBound(arrSystems) to UBound(arrSystems) '' Start SystemId Array
Loop
arrSystems(iLoop) = Trim(arrSystems(iLoop))
computerCount = computerCount + 1
session("systemId" & arrSystems(iLoop)) = arrSystems(iLoop) '' Define
SystemId Session

if request.querystring("newOrder") = "true" then '' Resets Session if it is
a New Order
session("systemIdCount" & arrSystems(iLoop)) = request("systemIdCount" &
arrSystems(iLoop)) '' Define SystemId Count Session
end if

if session("systemIdCount" & arrSystems(iLoop)) 0 then '' Check if count
is grater than 0
varSysId = session("systemId" & arrSystems(iLoop))
for varItemNum = 1 to session("systemIdCount" & arrSystems(iLoop)) '
varItemNum Loop
.........

I thought that the error was that session should be int, so add cint to the
this line: if (session("systemIdCount" & arrSystems(iLoop))) 0 However, I
got mismatch "cint" error.

What am I missing here?

Put a response.write in giving you the session variable that you're
trying to build

response.write(systemIdCount" & arrSystems(iLoop))

This will tell you the reason for the error.

Oct 26 '06 #3

P: n/a
Hi,
When i used to have this kind of errors in the past, the only result
was putting double quotes at the integer
which you have to replace this line
session("systemIdCount" & arrSystems(iLoop)) 0

with this
session("systemIdCount" & arrSystems(iLoop)) "0"

the common reason this error is accuring, is that when you submit
values from two fields with the same name and then retrieve it in your
code, the result will contain a comma.
So when you use the line of code [session("systemIdCount" &
arrSystems(iLoop)) 0]
what happens is this ["2, 0" 0]
which cannot be possible because you cant compare string with and
integer
so to bypass this error just put the double quotes and it will be ["2,
0" "0"]
which means it is comparing string with string, which is possible.

This should solve the problem, but since that error happened, take
advantage of it, and know where you are going wrong.

Hope what i wrote makes sense to you.
Best Regards
Firas S Assaad

On Oct 26, 3:28 pm, Snow <S...@discussions.microsoft.comwrote:
Thanks for help. I put response.write, but there was nothing shown on the page

"Larry Bud" wrote:
Snow wrote:
Hello:
I have Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "2, 0"]'
The error happened at this line: if session("systemIdCount" &
arrSystems(iLoop)) 0
The code like this:
strSystems = session("strSystems") '' Capture SystemId Array
arrSystems = split(strSystems, ",")
iLoop = 0
For iLoop = LBound(arrSystems) to UBound(arrSystems) '' Start SystemId Array
Loop
arrSystems(iLoop) = Trim(arrSystems(iLoop))
computerCount = computerCount + 1
session("systemId" & arrSystems(iLoop)) = arrSystems(iLoop) '' Define
SystemId Session
if request.querystring("newOrder") = "true" then '' Resets Session if it is
a New Order
session("systemIdCount" & arrSystems(iLoop)) = request("systemIdCount" &
arrSystems(iLoop)) '' Define SystemId Count Session
end if
if session("systemIdCount" & arrSystems(iLoop)) 0 then '' Check if count
is grater than 0
varSysId = session("systemId" & arrSystems(iLoop))
for varItemNum = 1 to session("systemIdCount" & arrSystems(iLoop)) '
varItemNum Loop
.........
I thought that the error was that session should be int, so add cint to the
this line: if (session("systemIdCount" & arrSystems(iLoop))) 0 However, I
got mismatch "cint" error.
What am I missing here?
Put a response.write in giving you the session variable that you're
trying to build
response.write(systemIdCount" & arrSystems(iLoop))
This will tell you the reason for the error.- Hide quoted text -- Show quoted text -
Oct 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.