473,511 Members | 15,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

strange error

Hi,

With this, i get the error:
" Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript "
at line 79

<%
totintot=request.cookies("totintot")
....
sql = "select count(*) as totuur from studres where dag>= curdate() group by
logon having logon='" & lol & "';" Set rs = objdc.execute(sql)
if rs.eof then
totu=0
else
rsArray = rs.GetRows()
totu = rsArray(0,0)
end if

if int(totu)>=int(totintot) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totintot) then flgmax=1 => type mismatch

Any idea?
Thanks
Chris
Dec 5 '05 #1
7 4510
At a guess, you're trying to cast a NULL to int - what's the value of totu?

Jevon
"Kevin" <ks****@smart.ca> wrote in message
news:uE****************@TK2MSFTNGP15.phx.gbl...
Hi,

With this, i get the error:
" Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript "
at line 79

<%
totintot=request.cookies("totintot")
...
sql = "select count(*) as totuur from studres where dag>= curdate() group
by
logon having logon='" & lol & "';" Set rs = objdc.execute(sql)
if rs.eof then
totu=0
else
rsArray = rs.GetRows()
totu = rsArray(0,0)
end if

if int(totu)>=int(totintot) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totintot) then flgmax=1 => type mismatch

Any idea?
Thanks
Chris

Dec 5 '05 #2
Thanks for replying...

Totintot = 10
totu = 1

The database is Mysql, but i suppose it' not relevant.
"Jevon" <pl****@ask.com> wrote in message
news:ej***************@TK2MSFTNGP11.phx.gbl...
At a guess, you're trying to cast a NULL to int - what's the value of totu?
Jevon
"Kevin" <ks****@smart.ca> wrote in message
news:uE****************@TK2MSFTNGP15.phx.gbl...
Hi,

With this, i get the error:
" Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript "
at line 79

<%
totintot=request.cookies("totintot")
...
sql = "select count(*) as totuur from studres where dag>= curdate() group by
logon having logon='" & lol & "';" Set rs = objdc.execute(sql)
if rs.eof then
totu=0
else
rsArray = rs.GetRows()
totu = rsArray(0,0)
end if

if int(totu)>=int(totintot) then flgmax=1 'this is line 79 rs.close
%>

With this : if totu>=int(totintot) then flgmax=1 => type mismatch

Any idea?
Thanks
Chris


Dec 5 '05 #3
Kevin wrote:
Hi,

With this, i get the error:
" Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript "
at line 79

<%
totintot=request.cookies("totintot")
...
sql = "select count(*) as totuur from studres where dag>= curdate()
group by logon having logon='" & lol & "';"
This has nothing to do with your error but: this query is less efficient
than it could be. Change it to:

sql = "select count(*) as totuur from studres " & _
"where dag>= curdate() AND logon='" & lol & "';"

Since you're only interested in a specific logon, there is no need to force
the database to go to the extra time and expense to group by logon and then
filter by logon after the table has been grouped and aggregated.

Set rs = objdc.execute(sql)
if rs.eof then
totu=0
else
rsArray = rs.GetRows()
totu = rsArray(0,0)
Again, probably nothing to do with your error, but this is overkill. There
is no need to waste CPU and memory by moving this single record into an
array. Simply do this:
totu=rs(0).value

totu=rs(0).value & ""
end if
In fact, this query should never return an empty recordset: you should
always get back a record containing 0 or higher in the first field, so
testing for eof is not really necessary (it IS a good habit to get into, so
consider this paragraph to be informational only).

if int(totu) >=int(totintot) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totintot) then flgmax=1 => type mismatch

You need to figure out which variable it is talking about (I suspect totu is
the problem, but ...):

Response.Write totintot & ": " & typename(totitntot) & "<BR>"
Response.Write totu & ": " & typename(totu) & "<BR>"
Response.Write flgmax & ": " & typename(flgmax) & "<BR>"

on error resume next
Response.Write int(totu) & "<BR>"
if err<>0 then
response.write "totu could not be converted to int" & "<BR>"
end if
Response.Write int(totitntot) & "<BR>"
if err<>0 then
response.write "totitntot could not be converted to int" & "<BR>"
end if

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Dec 5 '05 #4
ok, thanks

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OG****************@tk2msftngp13.phx.gbl...
Kevin wrote:
Hi,

With this, i get the error:
" Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript "
at line 79

<%
totintot=request.cookies("totintot")
...
sql = "select count(*) as totuur from studres where dag>= curdate()
group by logon having logon='" & lol & "';"
This has nothing to do with your error but: this query is less efficient
than it could be. Change it to:

sql = "select count(*) as totuur from studres " & _
"where dag>= curdate() AND logon='" & lol & "';"

Since you're only interested in a specific logon, there is no need to

force the database to go to the extra time and expense to group by logon and then filter by logon after the table has been grouped and aggregated.

Set rs = objdc.execute(sql)
if rs.eof then
totu=0
else
rsArray = rs.GetRows()
totu = rsArray(0,0)
Again, probably nothing to do with your error, but this is overkill. There
is no need to waste CPU and memory by moving this single record into an
array. Simply do this:
totu=rs(0).value

totu=rs(0).value & ""
end if


In fact, this query should never return an empty recordset: you should
always get back a record containing 0 or higher in the first field, so
testing for eof is not really necessary (it IS a good habit to get into,

so consider this paragraph to be informational only).

if int(totu) >=int(totintot) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totintot) then flgmax=1 => type mismatch
You need to figure out which variable it is talking about (I suspect totu

is the problem, but ...):

Response.Write totintot & ": " & typename(totitntot) & "<BR>"
Response.Write totu & ": " & typename(totu) & "<BR>"
Response.Write flgmax & ": " & typename(flgmax) & "<BR>"

on error resume next
Response.Write int(totu) & "<BR>"
if err<>0 then
response.write "totu could not be converted to int" & "<BR>"
end if
Response.Write int(totitntot) & "<BR>"
if err<>0 then
response.write "totitntot could not be converted to int" & "<BR>"
end if

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Dec 5 '05 #5
One more question, please...

The sql commands are of course dependant of the database (sql with MS access
will have a different syntax than with Mysql), but the vbscript written in
ASP, is it independant of the db, no? I noticed with the same application,
but one with ms access, the other with mysql and adapted sql syntax,
differences in the return of variables and in methods e.g. rs.RecordCount)
Thanks
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OG****************@tk2msftngp13.phx.gbl...
Kevin wrote:
Hi,

With this, i get the error:
" Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript "
at line 79

<%
totintot=request.cookies("totintot")
...
sql = "select count(*) as totuur from studres where dag>= curdate()
group by logon having logon='" & lol & "';"
This has nothing to do with your error but: this query is less efficient
than it could be. Change it to:

sql = "select count(*) as totuur from studres " & _
"where dag>= curdate() AND logon='" & lol & "';"

Since you're only interested in a specific logon, there is no need to

force the database to go to the extra time and expense to group by logon and then filter by logon after the table has been grouped and aggregated.

Set rs = objdc.execute(sql)
if rs.eof then
totu=0
else
rsArray = rs.GetRows()
totu = rsArray(0,0)
Again, probably nothing to do with your error, but this is overkill. There
is no need to waste CPU and memory by moving this single record into an
array. Simply do this:
totu=rs(0).value

totu=rs(0).value & ""
end if


In fact, this query should never return an empty recordset: you should
always get back a record containing 0 or higher in the first field, so
testing for eof is not really necessary (it IS a good habit to get into,

so consider this paragraph to be informational only).

if int(totu) >=int(totintot) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totintot) then flgmax=1 => type mismatch
You need to figure out which variable it is talking about (I suspect totu

is the problem, but ...):

Response.Write totintot & ": " & typename(totitntot) & "<BR>"
Response.Write totu & ": " & typename(totu) & "<BR>"
Response.Write flgmax & ": " & typename(flgmax) & "<BR>"

on error resume next
Response.Write int(totu) & "<BR>"
if err<>0 then
response.write "totu could not be converted to int" & "<BR>"
end if
Response.Write int(totitntot) & "<BR>"
if err<>0 then
response.write "totitntot could not be converted to int" & "<BR>"
end if

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Dec 5 '05 #6
It is possible. Different database providers may provide varying levels of
support for some methods/properties.
RecorCount will only work if the cursor you are using supports Bookmarks.
This will be true of all client-side cursors (adUseClient) and some
server-side cursors depending on provider support.
Kevin wrote:
One more question, please...

The sql commands are of course dependant of the database (sql with MS
access will have a different syntax than with Mysql), but the
vbscript written in ASP, is it independant of the db, no? I noticed
with the same application, but one with ms access, the other with
mysql and adapted sql syntax, differences in the return of variables
and in methods e.g. rs.RecordCount) Thanks
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OG****************@tk2msftngp13.phx.gbl...
Kevin wrote:
Hi,

With this, i get the error:
" Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript "
at line 79

<%
totintot=request.cookies("totintot")
...
sql = "select count(*) as totuur from studres where dag>= curdate()
group by logon having logon='" & lol & "';"


This has nothing to do with your error but: this query is less
efficient than it could be. Change it to:

sql = "select count(*) as totuur from studres " & _
"where dag>= curdate() AND logon='" & lol & "';"

Since you're only interested in a specific logon, there is no need
to force the database to go to the extra time and expense to group
by logon and then filter by logon after the table has been grouped
and aggregated.

Set rs = objdc.execute(sql)
if rs.eof then
totu=0
else
rsArray = rs.GetRows()
totu = rsArray(0,0)


Again, probably nothing to do with your error, but this is overkill.
There is no need to waste CPU and memory by moving this single
record into an array. Simply do this:
totu=rs(0).value

totu=rs(0).value & ""
end if


In fact, this query should never return an empty recordset: you
should always get back a record containing 0 or higher in the first
field, so testing for eof is not really necessary (it IS a good
habit to get into, so consider this paragraph to be informational
only).

if int(totu) >=int(totintot) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totintot) then flgmax=1 => type mismatch

You need to figure out which variable it is talking about (I suspect
totu is the problem, but ...):

Response.Write totintot & ": " & typename(totitntot) & "<BR>"
Response.Write totu & ": " & typename(totu) & "<BR>"
Response.Write flgmax & ": " & typename(flgmax) & "<BR>"

on error resume next
Response.Write int(totu) & "<BR>"
if err<>0 then
response.write "totu could not be converted to int" & "<BR>"
end if
Response.Write int(totitntot) & "<BR>"
if err<>0 then
response.write "totitntot could not be converted to int" & "<BR>"
end if

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Dec 5 '05 #7
Thanks

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:%2********************@TK2MSFTNGP10.phx.gbl.. .
It is possible. Different database providers may provide varying levels of
support for some methods/properties.
RecorCount will only work if the cursor you are using supports Bookmarks.
This will be true of all client-side cursors (adUseClient) and some
server-side cursors depending on provider support.
Kevin wrote:
One more question, please...

The sql commands are of course dependant of the database (sql with MS
access will have a different syntax than with Mysql), but the
vbscript written in ASP, is it independant of the db, no? I noticed
with the same application, but one with ms access, the other with
mysql and adapted sql syntax, differences in the return of variables
and in methods e.g. rs.RecordCount) Thanks
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OG****************@tk2msftngp13.phx.gbl...
Kevin wrote:
Hi,

With this, i get the error:
" Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript "
at line 79

<%
totintot=request.cookies("totintot")
...
sql = "select count(*) as totuur from studres where dag>= curdate()
group by logon having logon='" & lol & "';"

This has nothing to do with your error but: this query is less
efficient than it could be. Change it to:

sql = "select count(*) as totuur from studres " & _
"where dag>= curdate() AND logon='" & lol & "';"

Since you're only interested in a specific logon, there is no need
to force the database to go to the extra time and expense to group
by logon and then filter by logon after the table has been grouped
and aggregated.
Set rs = objdc.execute(sql)
if rs.eof then
totu=0
else
rsArray = rs.GetRows()
totu = rsArray(0,0)

Again, probably nothing to do with your error, but this is overkill.
There is no need to waste CPU and memory by moving this single
record into an array. Simply do this:
totu=rs(0).value

totu=rs(0).value & ""

end if

In fact, this query should never return an empty recordset: you
should always get back a record containing 0 or higher in the first
field, so testing for eof is not really necessary (it IS a good
habit to get into, so consider this paragraph to be informational
only).
if int(totu) >=int(totintot) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totintot) then flgmax=1 => type mismatch

You need to figure out which variable it is talking about (I suspect
totu is the problem, but ...):

Response.Write totintot & ": " & typename(totitntot) & "<BR>"
Response.Write totu & ": " & typename(totu) & "<BR>"
Response.Write flgmax & ": " & typename(flgmax) & "<BR>"

on error resume next
Response.Write int(totu) & "<BR>"
if err<>0 then
response.write "totu could not be converted to int" & "<BR>"
end if
Response.Write int(totitntot) & "<BR>"
if err<>0 then
response.write "totitntot could not be converted to int" & "<BR>"
end if

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Dec 5 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1772
by: WindAndWaves | last post by:
Hi Gurus The page below has a strange error. It seems to be working very well, just when you enter 8 or 9 for day, month or year then you get an error. I really have no idea where that is...
1
2339
by: sofakingfree | last post by:
This error is driving me nuts. The code below will run perfectly when it has a breakpoint. But as soon as I remove the breakpoint and run it normally outside of debug mode I get a strange error...
3
6946
by: Evangelista Sami | last post by:
hello i have this strange error message that i dont understand : _search.c: In function `_depth_search': _search.c:218: unable to find a register to spill in class `AREG' _search.c:218: this...
2
2632
by: Piedro | last post by:
Can someone reproduce the following error? I'm using the module at the bottom of my post to owner draw a menu items, I call the module from a form like this: Private Sub mnuOpen_DrawItem(ByVal...
3
2384
by: Richard Marsden | last post by:
Here's another strange error I'm getting when using ODBC to access MySQL. This time ODBC is being more informative, although all the documentation I've looked at, claims that the function in...
11
2568
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
11
2462
by: Mike C# | last post by:
Hi all, I keep getting a strange error and can't pin it down. The message is: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's...
5
375
by: nonamehkg | last post by:
Hi, my web service has recently got some strange error, and even the most simplest(empty) web method would crash with the error below: System.IndexOutOfRangeException: Index was outside the...
8
1888
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am migrating my C++ COM server to managed code (C# COM server). I am using the same client to use the same COM class in COM server. The C++ version COM server works properly,...
4
1681
by: muddasirmunir | last post by:
I am using vb6. Now , I am facing a very strange error. I think it might be due to some other problem rather coding not sure. Actually , i have put a datepicker in the form and at the load even...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.