473,795 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception error

Gentlemen a warm greeting of New Year, that everything is happy next to
their dear family and beings. Now to the subject, I have an error of
exception in this subroutine. The error is:(0x80020009)
A data base is SQL Server 2000.
*************** *************** ****
Sub Desplegar (Mes)
Set dConn=Server.Cr eateObject("ado db.connection")
dConn.open application("St rConRuta")
Set dRs=dConn.Execu te("select * from solicitud_canje _gte_temp where
rut='"&session( "Rut")&"' ORDER BY month(fecha)")
do until dRs.eof
Response.Write( "<tr align='center' bgcolor='#CCCCC C' >")
Response.Write( "<td colspan='6' class='txtTable Estilo6' >Canjes Mes
"&nombremes(mon th(dRs("fecha") ))&"</td>")
Response.Write( "</tr>")
Response.Write( "<tr align='center'> ")
Response.Write( "<td width='13%' class='txtTable ' ><div
align='center'> <strong>Fecha Canje </strong></div></td>")
Response.Write( "<td width='7%' class='txtTable '><div
align='center'> <strong>C&oacut e;digo</strong></div></td>")
Response.Write( "<td width='29%' class='txtTable '><div
align='center'> <strong>Product o</strong></div></td>")
Response.Write( "<td class='txtTable '><div
align='center'> <strong>Punto s</strong></div></td>")
Response.Write( "<td class='txtTable ' ><div
align='center'> <strong>Cantida d</strong></div></td>")
Response.Write( "<td class='txtTable ' ><div
align='center'> <strong>Objetiv o</strong></div></td>")
Response.Write( "</tr>")
VFech=dRs("fech a")
* Do until month(dRs("Fech a"))<>month(VFe ch) (Line of error) (0x80020009)
Response.Write( "<tr> ")
Response.Write( "<td width='10%' class='txtTable '>"&dRs("fecha" )&"</td>")
Response.Write( "<td width='10%' align='center' class='txtTable '
"&dRs("cod_pro ducto")&"</td>") Response.Write( "<td width='30%' align='center' class='txtTable '"&dRs("descrip cion")&"</td>") Response.Write( "<td width='10%' align='center' class='txtTable '"&dRs("puntos" )&"</td>") Response.Write( "<td width='10%' align='center' class='txtTable '"&dRs("cantida d")&"</td>")

Response.Write( "<td width='30%'
class='txtTable '>"&dRs("objeti vo")&"</td>")
Response.Write( "</tr>")
Total=cint(Tota l+cint(dRs("pun tos")))
dRs.MoveNext
Loop
Response.Write( "<tr align='center' class='txt'><td height='22' colspan='3'
align='center' class='txtTable '><div
align='center'> <strong>Sub-Total</strong><font size='2'></font>
</div></td><td width='10%' class='TxtTable '><div align='center'> <font
size='2'><"&for matnumber(Total ,0,,,-2)&"</font></div><td width='14%'
align='right' class='txtTable '><div align='center'> <font size='2'></font>
</div></td><td width='27%' class='txtTable '><div align='center'> <font
size='2'></font></div></td></tr>")
dRs.MoveNext
TotalG=cint(Tot alG+cint(Total) )
loop
End Sub

*************** *************** ****
This sub routine loads in a pagina a iforme ordered per month. Please help
me
Thanks
--
Marco Antonio Artus S.
Lakromsoft INC.
09-9594663
Jul 22 '05
12 1533
Lakrom wrote:
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> escribió en el mensaje
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
What about month(dRs("Fech a"))?
Are there any records where dRs("Fecha") is Null or empty?

No any one.


Show us the contents of dRs("Fecha")

You are going to need to verify where this error is occurring. The best way
to do that is create a test page with only the code needed to cause the
error. I would start with a page like this:

<%
Set dConn=Server.Cr eateObject("ado db.connection")
dConn.open application("St rConRuta")
dim sSQL
sSQL = "select * from solicitud_canje _gte_temp where " & _
"rut='"&session ("Rut")&"' ORDER BY month(fecha)".

Response.Write sSQL

Set dRs=dConn.Execu te(sSQL,,1)

if not dRs.EOF then
Response.Write dRs("Fecha")
Response.Write month(dRs("Fech a"))
end if
dRs.Close:Set dRs=Nothing
dConn.Close: Set dConn=Nothing
%>

Run this page and let us know if an error occurs. If no error occurs, then
the error is being caused by some other line in your code. Add lines from
the failing code one-at-a-time to the test page until you determine te
actual cause of the error, and let us know which one it is.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #11
Lakrom wrote:
The page...


You will be lucky if anyone looks at this. You will be better off creating a
small test page (as I described in my previous messsage) to try to
demonstrate your error rather than expecting somebody to read through all
the code in this page. Frankly, there was too much irrelevant code in your
original post.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #12
io
G'day Lakrom,

To help you out with this it'd be advantegeous if you included the error description as well. As your .asp page falls over it should come up with err description as well as a script line number that cuased the err (this is a default behaviour for MS IIS).

BTW, in the code below it seems that the line VFech=dRs("fech a") should be inside your inner loop rather than outside

............... ............... .....
............... ............... .....
............... ............... .....
Do until VFech<>dRs("Fec ha")
Response.Write( "<tr> ")
Response.Write( "<td width='10%' class='txtTable '>"&dRs("fecha" )&"</td>")
Response.Write( "<td width='10%' align='center' class='txtTable ' >"&dRs("cod_pro ducto")&"</td>")
Response.Write( "<td width='30%' align='center' class='txtTable ' >"&dRs("descrip cion")&"</td>")
Response.Write( "<td width='10%' align='center' class='txtTable ' >"&dRs("puntos" )&"</td>")
Response.Write( "<td width='10%' align='center' class='txtTable ' >"&dRs("cantida d")&"</td>")
Response.Write( "<td width='30%' class='txtTable '>"&dRs("objeti vo")&"</td>")
Response.Write( "</tr>")
Total=cint(Tota l+cint(dRs("pun tos")))
VFech=dRs("fech a")
dRs.MoveNext
Loop
VFech=dRs("fech a")
............... ............... .....
............... ............... .....
............... ............... .....

Cheers

Jul 22 '05 #13

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

Similar topics

6
2342
by: Daniel Wilson | last post by:
I am having exception-handling and stability problems with .NET. I will have a block of managed code inside try...catch and will still get a generic ..NET exception box that will tell me which assemblies are loaded before shutting down. In one case, some of my DB-accessing code didn't handle a NULL value properly. But try...catch wouldn't catch the exception and keep going. I'd just get the error message and then it would shut the...
7
2705
by: Ekim | last post by:
hy, I've a question concerning exception-handling in c++: is there a possibility to catch any exception (I know one can do that by "catch(...)") and display its default-error-message (like in Java)? or do you have to create your own exceptions and make your own error-messages? I would only need the error-number or something like a short description which exception occured, and subsequently I want to write it to a logfile.
44
4230
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level user tasks should always be included in a try/catch block that actually handles any exceptions that occur (log the exception, display a message box, etc.). 2. Low-level operations that are used to carry out the high level tasks
40
13536
by: Kevin Yu | last post by:
is it a bad programming design to throw exception in the try block then catch it??
3
1856
by: will | last post by:
Hi all. I've got an question about how to catch an exception. In Page_Load, I place a DataGrid, dg1, into edit mode. This will call the method called GenericGridEvent. GenericGridEvent will call a mehtod called ExceptionGenerator that will generate a run-time exception. The exception is caught in GenericGridEvent, but it isn't caught in InitializeComponenet (which doens't suprise me). I can't figure out where to catch an error that may...
5
3439
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS 5), but fails on IIS 6 running on a Win2003 server. The web uses Pages derived from a custom class I wrote (which itself derives from Page) to provide some common functionality. The Page_Load handler the failing webpage starts out like this: ...
9
2212
by: Claudio Di Flumeri | last post by:
Hello all, I've added a global exception handler to my application in this way: Sub Main() AddHandler Application.ThreadException, AddressOf ThreadException AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf UnhandledException Application.Run(Main)
132
5626
by: Zorro | last post by:
The simplicity of stack unraveling of C++ is not without defective consequences. The following article points to C++ examples showing the defects. An engineer aware of defects can avoid hard-to-find bugs. http://distributed-software.blogspot.com/2007/01/c-exception-handling-is-defective.html Regards, zorabi@ZHMicro.com http://www.zhmicro.com http://distributed-software.blogspot.com
2
6994
by: Darko Miletic | last post by:
Recently I wrote a dll in c++ and to simplify the distribution I decided to link with multithreaded static library (/MT or /MTd option). In debug everything works fine but in release I get this: parseMetadata.obj : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) 2>libcpmt.lib(string.obj) : error LNK2001: unresolved external symbol "public: __thiscall...
3
2043
by: Robert Rawlins | last post by:
Hi Mk, Yeah it's got me a little bemused to be honest, I've tried playing around with configuration options this morning and not been able to achieve anything that works properly. I'll keep testing though and as soon as I have a root cause to the problem I'll be sure to let the list know.
0
9522
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
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
10002
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
9044
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
7543
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
6783
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
5437
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
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.