MySQL with C#, from a PHP Developer's Standpoint -


I understand that with PHP I can use mysql_query ($ sql); And mysql_fetch_array ($ result); Get some MySQL data and keep it in an array. How is it achieved in C #, where I can say, keep my data in the datagrid?

This is probably the most specific ADO.NET code for filling the DataGrade Using:

  DataTable results = new DataTable (); (MySqlConnection conn = new MySqlConnection (connString)) (MySqlCommand command = new MySqlCommand (sqlQuery, conn)) {MySqlDataAdapter adapter = new MySqlDataAdapter (command); Conn.Open (); Adapter.Fill (result); }} SomeDataGrid.DataSource = Results; SomeDataGrid.DataBind ();  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -