Click here to Skip to main content
15,918,808 members
Home / Discussions / C#
   

C#

 
GeneralRe: To execute code on clicking the link from emil Pin
Expert Coming12-Feb-08 5:17
Expert Coming12-Feb-08 5:17 
GeneralRe: To execute code on clicking the link from emil Pin
Justin Perez12-Feb-08 4:28
Justin Perez12-Feb-08 4:28 
GeneralRe: To execute code on clicking the link from emil Pin
Ravenet12-Feb-08 14:55
Ravenet12-Feb-08 14:55 
GeneralActiveDirectory LogonHours to boolean array ??? [modified] Pin
Paw Jershauge12-Feb-08 3:37
Paw Jershauge12-Feb-08 3:37 
GeneralRe: ActiveDirectory LogonHours to boolean array ??? Pin
Paw Jershauge12-Feb-08 4:54
Paw Jershauge12-Feb-08 4:54 
QuestionSearching word/Phrase in Excel/PDF/Doc file in a ASP.Net Application Pin
Member 422892512-Feb-08 2:48
Member 422892512-Feb-08 2:48 
GeneralRe: Searching word/Phrase in Excel/PDF/Doc file in a ASP.Net Application Pin
Paddy Boyd12-Feb-08 4:00
Paddy Boyd12-Feb-08 4:00 
QuestionSqlExceptions Pin
Harvey Saayman12-Feb-08 0:50
Harvey Saayman12-Feb-08 0:50 
Hi guys

im sitting with a little delema. i need to determine which kind
of SqlException was thrown by sql. i tried using SqlException.ErrorCode like so
<code lang="cs">
try
{
//do sum stuff
}
catch(SqlException sqlEx)
{
if(sqlEx.ErrorCode == -2146232060)
{
//handel the error
}
else 
{
//throw a "generic" error message by 
means of a messageBox that displays the 
errorCode and errorMessage
}
}
</code>


now i initially thaught that -2146232060 is the error code for violating a unique constraint, but i later noticed that the exact same code is used when there is no longer access to the db

i need to be able to handle these exceptions in different ways

how exactly can i determine what actualy went wrnog on the sql end so that i can prompt the user accordingly EG. "user alredy exists" or "database no longer avalible"

thanx

Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS

GeneralRe: SqlExceptions Pin
Martin#12-Feb-08 1:10
Martin#12-Feb-08 1:10 
GeneralRe: SqlExceptions Pin
Harvey Saayman12-Feb-08 2:28
Harvey Saayman12-Feb-08 2:28 
GeneralRe: SqlExceptions Pin
Martin#12-Feb-08 2:31
Martin#12-Feb-08 2:31 
QuestionRe: SqlExceptions Pin
Vasudevan Deepak Kumar12-Feb-08 1:12
Vasudevan Deepak Kumar12-Feb-08 1:12 
GeneralRe: SqlExceptions Pin
Expert Coming12-Feb-08 5:20
Expert Coming12-Feb-08 5:20 
QuestionHow can I capture window of a client using C# and asp3.0? Pin
monSur hoq11-Feb-08 23:54
monSur hoq11-Feb-08 23:54 
GeneralRe: How can I capture window of a client using C# and asp3.0? Pin
Joachim Kerschbaumer11-Feb-08 23:58
Joachim Kerschbaumer11-Feb-08 23:58 
General[Message Deleted] Pin
monSur hoq12-Feb-08 1:06
monSur hoq12-Feb-08 1:06 
GeneralRe: How can I capture window of a client using C# and asp3.0? Pin
Joachim Kerschbaumer12-Feb-08 1:12
Joachim Kerschbaumer12-Feb-08 1:12 
GeneralRe: How can I capture window of a client using C# and asp3.0? Pin
monSur hoq12-Feb-08 1:24
monSur hoq12-Feb-08 1:24 
GeneralRe: How can I capture window of a client using C# and asp3.0? Pin
Joachim Kerschbaumer12-Feb-08 2:05
Joachim Kerschbaumer12-Feb-08 2:05 
AnswerRe: How can I capture window of a client using C# and asp3.0? Pin
Guffa12-Feb-08 0:46
Guffa12-Feb-08 0:46 
GeneralRe: How can I capture window of a client using C# and asp3.0? Pin
monSur hoq12-Feb-08 0:59
monSur hoq12-Feb-08 0:59 
GeneralRe: How can I capture window of a client using C# and asp3.0? Pin
Guffa12-Feb-08 3:30
Guffa12-Feb-08 3:30 
GeneralThe ConnectionString property has not been initialized Pin
D i x y11-Feb-08 23:08
D i x y11-Feb-08 23:08 
GeneralRe: The ConnectionString property has not been initialized Pin
Joachim Kerschbaumer12-Feb-08 0:03
Joachim Kerschbaumer12-Feb-08 0:03 
GeneralRe: The ConnectionString property has not been initialized Pin
Ravenet12-Feb-08 15:03
Ravenet12-Feb-08 15:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.