home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Anyone have trouble with SQL Exception catching in .Net?

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1444
Discussions: 200,989, Posts: 2,379,857, Members: 246,354
Old January 2nd, 2003, 03:22 AM   Digg it!   #1 (permalink)
Member
 
Join Date: Sep 2002
Posts: 364
Anyone have trouble with SQL Exception catching in .Net?

I am. I've got a method that fills my dataset. The fill is in a try block.

But the thing is, I make the connection to my database depending on a registry key that my app writes or updates.

I'm testing it with a bad key, so I should get an error when filling the dataset. I do get an error, but when it does, my catch block is supposed to notify the user and have the user edit the key.

It even goes as far is if I do

catch(Exception e)
{ /*code here*/}

telling me that the variable e is never used. Any ideas?

The IDE tells me there was an unhandled SQL Exception and wants me to debug.
Creosote is offline   Reply With Quote
Old January 2nd, 2003, 03:27 AM     #2 (permalink)
Member
 
Join Date: Sep 2002
Posts: 364
Hmmm, now it's not saying that my Exception will never be used.

The thing is, its showing the error w/o the handling when I'm calling my method, not on the line of code that is actually trying to fill the dataset.
Creosote is offline   Reply With Quote
Old January 2nd, 2003, 03:52 AM     #3 (permalink)
Member
 
Join Date: Sep 2002
Posts: 364
Well if I run it outside of the IDE, it throws the exception to that little 'unhandled exception' window. Lets you continue. Doesn't show any information that would be useable to the user though
Creosote is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3063)
Charges against non-tippers dropped.. (20)
Health Care Rationing (11)
Delete an OS (17)
Nvidia GTX 260 problem (9)
Laptop with wireless problem. (12)
windows vista security holes (19)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (8)
windows 7 problem (7)
[F@H SPAM 11/16/09] ! 1/2 months to.. (39)
Internet Lost (5)
Recent Discussions
How to converter MTS Video to HD mpeg.. (0)
Can a page file be "too big".. (0)
Point and Shoot Camera Suggestions. (8)
Looking for new motherboard (0)
Size after cutting 700Mb file is 2.5 .. (0)
Delete an OS (17)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (39)
windows vista security holes (19)
updating BIOS via winflash, claims fi.. (1)
New Server Configuration Suggestions (0)
Desktop Calendar Application (0)
cheap gaming laptop? (12)
Unallocated Space (2)
help me pls laptop just stopped worki.. (1)
C# + LINQ Help (7)
Nvidia GTX 260 problem (9)
Dynex DX E-402 (3)
EVGA 9800 gtx help with finding a goo.. (12)
Multiple Restarts Required at Boot (5)
cell phone won't work (0)
Is the PSU I received dead? (15)
Can't open Word (12)
Steam ID's, Gamertags etc... (4)
Games, Cables, PCI cards, and more fo.. (6)
Dept. of HS: NSA 'Helped' Develop Vis.. (17)


All times are GMT -4. The time now is 05:22 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28