473,769 Members | 5,900 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=reques t.cookies("toti ntot")
....
sql = "select count(*) as totuur from studres where dag>= curdate() group by
logon having logon='" & lol & "';" Set rs = objdc.execute(s ql)
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(totin tot) then flgmax=1 => type mismatch

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

Jevon
"Kevin" <ks****@smart.c a> wrote in message
news:uE******** ********@TK2MSF TNGP15.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=reques t.cookies("toti ntot")
...
sql = "select count(*) as totuur from studres where dag>= curdate() group
by
logon having logon='" & lol & "';" Set rs = objdc.execute(s ql)
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(totin tot) 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******** *******@TK2MSFT NGP11.phx.gbl.. .
At a guess, you're trying to cast a NULL to int - what's the value of totu?
Jevon
"Kevin" <ks****@smart.c a> wrote in message
news:uE******** ********@TK2MSF TNGP15.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=reques t.cookies("toti ntot")
...
sql = "select count(*) as totuur from studres where dag>= curdate() group by
logon having logon='" & lol & "';" Set rs = objdc.execute(s ql)
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(totin tot) 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=reques t.cookies("toti ntot")
...
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(s ql)
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).valu e

totu=rs(0).valu e & ""
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(totinto t) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totin tot) 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(totitn tot) & "<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******@NOyah oo.SPAMcom> wrote in message
news:OG******** ********@tk2msf tngp13.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=reques t.cookies("toti ntot")
...
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(s ql)
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).valu e

totu=rs(0).valu e & ""
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(totinto t) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totin tot) 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(totitn tot) & "<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******@NOyah oo.SPAMcom> wrote in message
news:OG******** ********@tk2msf tngp13.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=reques t.cookies("toti ntot")
...
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(s ql)
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).valu e

totu=rs(0).valu e & ""
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(totinto t) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totin tot) 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(totitn tot) & "<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******@NOyah oo.SPAMcom> wrote in message
news:OG******** ********@tk2msf tngp13.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=reques t.cookies("toti ntot")
...
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(s ql)
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).valu e

totu=rs(0).valu e & ""
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(totinto t) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totin tot) 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(totitn tot) & "<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******@NOyah oo.SPAMcom> wrote in message
news:%2******** ************@TK 2MSFTNGP10.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******@NOyah oo.SPAMcom> wrote in message
news:OG******** ********@tk2msf tngp13.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=reques t.cookies("toti ntot")
...
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(s ql)
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).valu e

totu=rs(0).valu e & ""

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(totinto t) then flgmax=1 'this is line 79
rs.close
%>

With this : if totu>=int(totin tot) 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(totitn tot) & "<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
1798
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 coming from. Can you help? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD>
1
2354
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 message that says: "Microsoft Office PowerPoint has encountered a problem and needs to close. We are sorry for the inconvience. If you were in the middle of something, the information you were working on might be lost."
3
6983
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 is the insn: (insn 83 82 84 (parallel ) (reg:SI 1 edx ))) (set (reg:SI 1 edx )
2
2647
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 sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles mnuOpen.DrawItem Dim Ic As New Icon(Application.StartupPath & "\101_72.ico") DrawItems(e, mnuOpen, Ic) End Sub
3
2401
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 question (SQLSetPos) should not return the error! I have a result set that has been opened for update. I am trying to delete the current row with a call to SQLSetPos: rc = SQLSetPos( hStmt, nRow, SQL_DELETE, SQL_LOCK_NO_CHANGE );
11
2597
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 temperatures. T = 20 degrees at all times.... The 2D T-array looks like this:
11
2496
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 support team for more information. However I'm not purposely requesting that the Runtime terminate in an "unusual way." The line that is causing me headaches is:
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 bounds of the array. at System.Web.Services.Protocols.HttpServerType..ctor(Type type) at System.Web.Services.Protocols.HttpServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create
8
1918
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, but when using the C# COM server, there is a strange error indicating dll is not installed correctly (data link error). I have tried to delete the DLL at the same time to test whether the DLL could be found correctly when the client is invoking...
4
1691
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 of form i had use the code Date1.value= Date
0
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9990
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3956
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 we have to send another system

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.