473,326 Members | 2,125 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,326 software developers and data experts.

SQLException

Hi,

I am trying to trap a SQLException erro in my Global.asax
file but I am unable to do it. In my Application_Error
code block I have a simple response.write followed by a
response.end but when a SQLException error (violation of
primary key) occurs this code does not execute, however it
does execute if I receive a Compiler error, is it not
possible to trap these types of exceptions globally?

Thanks in advance for any help with this

Dave
Nov 18 '05 #1
1 1850
By the time application_error fires, the request is dead. You can't write
anything out or do a redirect or anything like that. This has nothing to do
with the fact that this is a SqlException.

Try handling Page_error in your page.

"Dave" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Hi,

I am trying to trap a SQLException erro in my Global.asax
file but I am unable to do it. In my Application_Error
code block I have a simple response.write followed by a
response.end but when a SQLException error (violation of
primary key) occurs this code does not execute, however it
does execute if I receive a Compiler error, is it not
possible to trap these types of exceptions globally?

Thanks in advance for any help with this

Dave

Nov 18 '05 #2

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

Similar topics

4
by: sumithradevi | last post by:
Hello Friends, I am getting the following error. java.sql.SQLException: ORA-00020: maximum number of processes (100) exceeded I am closing all my resultsets and all my connections in the try...
2
by: stanley J mroczek | last post by:
System.Data.SqlClient.SqlException: General network error. Check your network documentation. I know that this is not much to go on. But I don't know where to start. the program updates 186 records...
0
by: Eckard Buchner | last post by:
Hi, we have a query that returns only a few rows, but has a lot of columns in group by clause. In some cases we receive an SQL Exception. Here is the trace setString (1, 20040928001) called...
3
by: Mr.KisS | last post by:
Hello all, I'm working with : WinXP PRO SP1, MS SQL 2005 Express, Visual Web Dev 2005 Express. I have an aspx page which must execute a stored procedure : ______________ try {...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
2
by: Dan Holmes | last post by:
I don't know how to troubleshoot this one. src is after the error. "System.Data.SqlClient.SqlException: XML parsing: line 1, character 698, illegal qualified name character\r\n at...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
1
by: thithi | last post by:
Please help me " System.Data.SqlClient.SqlException: Prepared statement '(@Name varchar(100),@Describes varchar(100),@Money char(10))Upda' expects parameter @Describes, which was not supplied. at...
9
by: freethinker | last post by:
Hi, I have a database class I use to get and drop db connections: public class Database { protected static Connection c; //.... /// .. c = DriverManager.getConnection .... ...
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...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.