Click here to Skip to main content
15,913,388 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: SqlExceptions Pin
Martin#12-Feb-08 1:10
Martin#12-Feb-08 1:10 
Hello,

As the SqlException can return more than one, you would have to iterate over the Errors (SqlError[]) and check the "Number" Property there.
MSDN Example:
catch(SqlException exception)
{
    for (int i = 0; i < exception.Errors.Count; i++)
    {
        Console.WriteLine("Index #" + i + "\n" +
            "Source: " + exception.Errors[i].Source + "\n" +
            "Number: " + exception.Errors[i].Number.ToString() + "\n" +
            "State: " + exception.Errors[i].State.ToString() + "\n" +
            "Class: " + exception.Errors[i].Class.ToString() + "\n" +
            "Server: " + exception.Errors[i].Server + "\n" +
            "Message: " + exception.Errors[i].Message + "\n" +
            "Procedure: " + exception.Errors[i].Procedure + "\n" +
            "LineNumber: " + exception.Errors[i].LineNumber.ToString());
    }
    Console.ReadLine();
}


All the best,

Martin

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 
QuestionVS2005 Problem ?? Pin
stancrm11-Feb-08 22:38
stancrm11-Feb-08 22:38 

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.