473,246 Members | 1,356 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,246 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 5174
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: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.