Click here to Skip to main content
15,889,403 members
Home / Discussions / C#
   

C#

 
QuestionRemove a certain row from the Datatable [modified] Pin
NewToAspDotNet20-Jul-08 1:24
NewToAspDotNet20-Jul-08 1:24 
AnswerRe: Remove a certain row from the Datatable Pin
Wendelius20-Jul-08 2:47
mentorWendelius20-Jul-08 2:47 
AnswerRe: Remove a certain row from the Datatable Pin
Guffa20-Jul-08 3:38
Guffa20-Jul-08 3:38 
Questionprinting a page Pin
SWAPNIL MISHRA20-Jul-08 0:50
SWAPNIL MISHRA20-Jul-08 0:50 
AnswerRe: printing a page Pin
Mbah Dhaim20-Jul-08 3:13
Mbah Dhaim20-Jul-08 3:13 
GeneralRe: printing a page Pin
Luc Pattyn20-Jul-08 3:53
sitebuilderLuc Pattyn20-Jul-08 3:53 
GeneralRe: printing a page Pin
Mbah Dhaim20-Jul-08 5:40
Mbah Dhaim20-Jul-08 5:40 
Questionif statement (MySQL Connection == true) .. Pin
njitram20-Jul-08 0:27
njitram20-Jul-08 0:27 
Heyho SeeSharp PPL,

I have a question, for status connection:

        private void button2_Click(object sender, EventArgs e)<br />
        {<br />
            string MyConString = "SERVER=" + WheRe + ";DATABASE=" + dB + ";UID=" + aCC + ";PASSWORD=" + Pw + ";";<br />
            MySqlConnection connection = new MySqlConnection(MyConString);<br />
<br />
            if (connection.State == ConnectionState.Closed)<br />
            {<br />
                string code = "Connection failed!";<br />
            }<br />
            else<br />
            {<br />
                string code = "Connection successful!";<br />
            }<br />
<br />
<br />
            System.Windows.Forms.MessageBox.Show(this, code);<br />
            connection.Close();<br />
            this.Close();<br />
        }


How can i make the if statement to work it does show me anny errors.. and it doesnt work like i want it todo.. Frown | :(

Anny one? =)
AnswerRe: if statement (MySQL Connection == true) .. Pin
Wendelius20-Jul-08 0:42
mentorWendelius20-Jul-08 0:42 
AnswerRe: if statement (MySQL Connection == true) .. Pin
SWAPNIL MISHRA20-Jul-08 0:53
SWAPNIL MISHRA20-Jul-08 0:53 
AnswerRe: if statement (MySQL Connection == true) .. Pin
Guffa20-Jul-08 1:10
Guffa20-Jul-08 1:10 
AnswerRe: if statement (MySQL Connection == true) .. Pin
njitram20-Jul-08 7:49
njitram20-Jul-08 7:49 
AnswerRe: if statement (MySQL Connection == true) .. Pin
Wendelius20-Jul-08 9:26
mentorWendelius20-Jul-08 9:26 
GeneralRe: if statement (MySQL Connection == true) .. Pin
njitram20-Jul-08 10:28
njitram20-Jul-08 10:28 
GeneralRe: if statement (MySQL Connection == true) .. Pin
Wendelius20-Jul-08 10:40
mentorWendelius20-Jul-08 10:40 
QuestionDatatable select methode Pin
NewToAspDotNet20-Jul-08 0:18
NewToAspDotNet20-Jul-08 0:18 
AnswerRe: Datatable select methode Pin
Wendelius20-Jul-08 0:35
mentorWendelius20-Jul-08 0:35 
QuestionC# - How can I read website local path in IIS? Pin
punkymt119-Jul-08 22:37
punkymt119-Jul-08 22:37 
AnswerRe: C# - How can I read website local path in IIS? Pin
Mbah Dhaim19-Jul-08 22:42
Mbah Dhaim19-Jul-08 22:42 
GeneralRe: C# - How can I read website local path in IIS? Pin
punkymt119-Jul-08 22:53
punkymt119-Jul-08 22:53 
GeneralRe: C# - How can I read website local path in IIS? Pin
Mbah Dhaim20-Jul-08 9:45
Mbah Dhaim20-Jul-08 9:45 
GeneralRe: C# - How can I read website local path in IIS? Pin
punkymt123-Jul-08 3:20
punkymt123-Jul-08 3:20 
QuestionBasic Conversion Pin
dabuskol19-Jul-08 21:13
dabuskol19-Jul-08 21:13 
AnswerRe: Basic Conversion Pin
Dominik Reichl19-Jul-08 21:54
Dominik Reichl19-Jul-08 21:54 
QuestionThread problem using TCP client and Form? Pin
Hax0r77819-Jul-08 21:02
Hax0r77819-Jul-08 21:02 

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.