Click here to Skip to main content
15,903,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends,

i am new to wpf,. now i try bind the data in wpf textbox,. but i dont know how to code it. pls help me,.

my code for,. connect mysql.

private void button1_Click(object sender, RoutedEventArgs e)
        {
            string MyConString = "SERVER=192.168.1.100;" +
                "DATABASE=mcs_kiosk;" +
                "UID=root;" +
                "PASSWORD=;";
            MySqlConnection connection = new MySqlConnection(MyConString);
            MySqlCommand command = connection.CreateCommand();
            MySqlDataReader Reader;
            command.CommandText = "select * from mcs_User";
            connection.Open();
            Reader = command.ExecuteReader();        
           //textBox1.text = ? ;
            connection.Close();
        }


thank u,.
Posted
Updated 14-Feb-11 23:32pm
v2

1 solution

Please check the following KB article:
http://msdn.microsoft.com/en-us/library/aa480226.aspx[^]
 
Share this answer
 
Comments
Sagotharan Jagadeeswaran 15-Feb-11 7:37am    
thank u friend.

do you know how to code for data loading in after clicking button?,.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900