Click here to Skip to main content
15,923,168 members
Home / Discussions / C#
   

C#

 
GeneralRe: Array of objects Pin
Michael Sync30-Dec-07 5:33
Michael Sync30-Dec-07 5:33 
Generalproblem usinf usercontrol object in HTML page Pin
samy10029-Dec-07 14:32
samy10029-Dec-07 14:32 
GeneralRe: problem usinf usercontrol object in HTML page Pin
Michael Sync29-Dec-07 22:27
Michael Sync29-Dec-07 22:27 
AnswerRe: problem usinf usercontrol object in HTML page Pin
dipak.dipak30-Dec-07 2:19
dipak.dipak30-Dec-07 2:19 
GeneralRe: problem usinf usercontrol object in HTML page Pin
samy10030-Dec-07 11:39
samy10030-Dec-07 11:39 
GeneralBinding to a property Pin
peterchen29-Dec-07 14:30
peterchen29-Dec-07 14:30 
GeneralMySql & C# Question ... pulling data Pin
shadowhazard29-Dec-07 9:59
shadowhazard29-Dec-07 9:59 
GeneralRe: MySql & C# Question ... pulling data [modified] Pin
shadowhazard29-Dec-07 11:27
shadowhazard29-Dec-07 11:27 
ok i think i have it now, just need to make some minor alterations, and instead of using a load button i will be using a the Select.Item.Index from a listbox to retrieve the information from the database. if anyone has any comments or notices room for correction please let me know. i enjoy C# but i am new to the combination of C# & MySql.

private void loadBtn_Click(object sender, EventArgs e)<br />
        {<br />
            //select the database & table<br />
            string strFindMovie = "SELECT movie_name FROM movie WHERE movie_id='1'";<br />
<br />
            //create the connection between the program and the database<br />
            MySql.Data.MySqlClient.MySqlConnection conDatabase = new <br />
                MySql.Data.MySqlClient.MySqlConnection("Data Source=localhost; Database=moviesite; username=******; password=*****");<br />
            MySql.Data.MySqlClient.MySqlCommand cmdDatabase = new <br />
                MySql.Data.MySqlClient.MySqlCommand(strFindMovie, conDatabase);<br />
<br />
            //open connection to the dtabase<br />
            conDatabase.Open();<br />
<br />
            MySql.Data.MySqlClient.MySqlDataReader rdrMovie;<br />
            rdrMovie = cmdDatabase.ExecuteReader();<br />
<br />
            while (rdrMovie.Read())<br />
            {<br />
                this.nameTB.Text = rdrMovie.GetString(0);<br />
            }<br />
<br />
            //closes teh reader<br />
            rdrMovie.Close();<br />
            //closes the con to the database<br />
            conDatabase.Close();<br />
        }


modified on Saturday, December 29, 2007 5:46:14 PM

GeneralRe: MySql & C# Question ... pulling data Pin
Justin Perez29-Dec-07 14:00
Justin Perez29-Dec-07 14:00 
GeneralRe: MySql & C# Question ... pulling data Pin
shadowhazard29-Dec-07 17:16
shadowhazard29-Dec-07 17:16 
GeneralRe: MySql & C# Question ... pulling data Pin
Mark Churchill30-Dec-07 15:59
Mark Churchill30-Dec-07 15:59 
GeneralRe: MySql & C# Question ... pulling data Pin
shadowhazard30-Dec-07 17:30
shadowhazard30-Dec-07 17:30 
QuestionAny query about northwind? Pin
omegazafer29-Dec-07 9:44
omegazafer29-Dec-07 9:44 
AnswerRe: Any query about northwind? Pin
Paul Conrad30-Dec-07 6:44
professionalPaul Conrad30-Dec-07 6:44 
GeneralRe: Any query about northwind? Pin
omegazafer30-Dec-07 10:09
omegazafer30-Dec-07 10:09 
GeneralRe: Any query about northwind? Pin
Paul Conrad30-Dec-07 10:30
professionalPaul Conrad30-Dec-07 10:30 
GeneralRe: Any query about northwind? Pin
omegazafer30-Dec-07 10:57
omegazafer30-Dec-07 10:57 
Generali need your help ....am stuck Pin
netJP12L29-Dec-07 9:40
netJP12L29-Dec-07 9:40 
GeneralA little problem Pin
zeeShan anSari29-Dec-07 8:28
zeeShan anSari29-Dec-07 8:28 
AnswerRe: A little problem Pin
Guffa29-Dec-07 9:03
Guffa29-Dec-07 9:03 
GeneralRe: A little problem Pin
Rich Insley29-Dec-07 9:08
Rich Insley29-Dec-07 9:08 
QuestionGetting handle to browser window? Pin
cakewalkr729-Dec-07 3:30
cakewalkr729-Dec-07 3:30 
GeneralRe: Getting handle to browser window? Pin
Scott Dorman29-Dec-07 3:59
professionalScott Dorman29-Dec-07 3:59 
GeneralException handling scenario Pin
beatles169229-Dec-07 1:23
beatles169229-Dec-07 1:23 
GeneralRe: Exception handling scenario Pin
Luc Pattyn29-Dec-07 1:58
sitebuilderLuc Pattyn29-Dec-07 1:58 

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.