[thelist] MySQL vs. VBScript - why type mismatch?
Canfield, Joel
JCanfield at PacAdvantage.org
Mon Jun 19 14:44:15 CDT 2006
feeling stupid here; why am I getting 'type mismatch' from this? seems
to me that treating '5' as an integer should be working
code:
strQuery = "select (cast(count(distinct u.LastName) as Unsigned
Integer)) as
'AgentsWithStatsCount' from mxuser u, agentpresence p where u.userid
= p.userid
and userprofilename = 'CallCenter' and IsLast = 1
and p.starttime between '" & datDataDate & " 0:00:00' and '" &
datDataDate & " 23:59:59'"
Set AgentsWithStatsNames = cnxZ.Execute(strQuery)
If Not(AgentsWithStatsNames.BOF And AgentsWithStatsNames.EOF) Then
response.write("AgentsWithStatsNames(""AgentsWithStatsCount"") =
" &
AgentsWithStatsNames("AgentsWithStatsCount") & "<br >" &
vbCrLf)
intLastAgent = AgentsWithStatsNames("AgentsWithStatsCount")
intLastAgent = 1 * intLastAgent
and the page returns
AgentsWithStatsNames("AgentsWithStatsCount") = 5
Microsoft VBScript runtime error '800a000d'
Type mismatch
/+wip/zultys/AgentStatisticsA.asp, line 127
line 127 is the last line of my code block above
More information about the thelist
mailing list