473,387 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

error '800a040e'

Hi,
the enclosed code loops through a recordset for time and date. and printing out
name and volym if certan conditions are met.
<%
dat = ""
tp = ""
vt = 0
et = 0
vd = 0
de = 0
Do While Not rs1.EOF
If dat <> CDate(rs1("Dag")) then
If tp <> CDate(rs1("tidpunkt")) then
if not tp = "" then
Response.Write "<TR>"
Response.Write "<TD COLSPAN = 4 Align = right >"
Response.Write "<B><U>Givet volym</U></B></TD>"
Response.Write "<TD>" & vt & "</TD></TR>"
Response.Write "<TR>"
Response.Write "<TD COLSPAN = 4 Align = right>"
Response.Write "<B><U>Energi</U></B></TD></TD>"
Response.Write "<TD>" & et & "</TD></TR>"
end if
If not dat = "" then
Response.Write "<TR>"
Response.Write "<TD COLSPAN = 5 Align = right >"
Response.Write "<B><U>Under dygnet givet volym</U></B></TD>"
Response.Write "<TD>" & vt & "</TD></TR>"
Response.Write "<TR>"
Response.Write "<TD COLSPAN = 5 Align = right>"
Response.Write "<B><U>Energi givet under dygnet</U></B></TD></TD>"
Response.Write "<TD>" & de & "</TD></TR>"
end if

dat = CDate(rs1("Dag"))
vt = cint(rs1("Volym"))
et = cint(rs1("Energi"))
tp = CDate(rs1("tidpunkt"))
Response.Write "<TR><TD>" & CDate(rs1("Dag"))& "</TD>"
Response.Write "<TD>" & CDate(rs1("tidpunkt"))& "</TD>"
Response.Write "<TD>" & rs1("FluidNamn") & "</TD>"
Response.Write "<TD>" & rs1("Volym") & "</TD></TR>"
Else
vt = vt + cint(rs1("Volym"))
et = et + cint(rs1("Energi"))
Response.Write "<TR><TD>&nbsp;</TD>"
Response.Write"<TD>&nbsp;</TD>"
Response.Write "<TD>" & rs1("FluidNamn") & "</TD>"
Response.Write "<TD>" & rs1("Volym") & "</TD></TR>"
End If
Else
vd = vt + vt
de = de + de
rs1.MoveNext
Loop
if not tp = "" then
Response.Write "<TR>"
Response.Write "<TD COLSPAN = 4 Align = right >"
Response.Write "<B><U>Givet volym</U></B></TD>"
Response.Write "<TD>" & vt & "</TD></TR>"
Response.Write "<TR>"
Response.Write "<TD COLSPAN = 4 Align = right>"
Response.Write "<B><U>Energi</U></B></TD></TD>"
Response.Write "<TD>" & et & "</TD></TR>"
end if
If not dat = "" then
Response.Write "<TR>"
Response.Write "<TD COLSPAN = 5 Align = right >"
Response.Write "<B><U>Under dygnet givet volym</U></B></TD>"
Response.Write "<TD>" & vt & "</TD></TR>"
Response.Write "<TR>"
Response.Write "<TD COLSPAN = 5 Align = right>"
Response.Write "<B><U>Energi givet under dygnet</U></B></TD></TD>"
Response.Write "<TD>" & de & "</TD></TR>"
end if
vbalans.Close
Set vbalans = Nothing
%>

I keeping geting:

Microsoft VBScript compilation error '800a040e'

'loop' without 'do'

/vatskebalans/visa_rapporten102.asp, line 87

Loop
^

Please help me out
Yours
Peter
Jul 19 '05 #1
2 5186
PeterL wrote on 10 mei 2004 in microsoft.public.inetserver.asp.general:
'loop' without 'do'


your if-then-[else]-end-if's are not ended before the loop

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
Thanks 4 your answer and help
Now that it works I se more problems - I hope you can help me with
this even though the page is in swedish
1)Not al post shows i.e if hou visit the page
http://www12.brinkster.com/vatskebalans/count.asp and mark "Elvansson"
then you see
a) for 040321 there is 5 posts for time 00:00
b)for 040603 there´s in the database 2 posts 14:42, 1 post kl 00:00
and 1 post kl 14:20

c) "Energi givet under dygnet" = de in my code doesn´t give the right
answer -something wrong with my formula

2) for the others on that page I keep getting error:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'CDate'
/vatskebalans/visa_rapporten102.asp, line 45

and line 45 = If tp <> CDate(rs1("tidpunkt")) then
please help me out with my problems

Thx in advance
/Peter
Jul 19 '05 #3

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

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
1
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
1
by: yanwan | last post by:
I met this problem in executing a c++ project in visual studio. Does anyone have suggestions to resolve "error lnk 2001"? --------------------Configuration: reconstruction - Win32...
5
by: Enos Meroka | last post by:
Hallo, I am a student doing my project in the university.. I have been trying to compile the program using HP -UX aCC compiler, however I keep on getting the following errors. ...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.