try { sqlConnection.Open(); sqlCommand = new SqlCommand(strQuery, sqlConnection); sqlReader = sqlCommand.ExecuteReader(); while (sqlReader.Read()) { object[] row = { sqlReader[0]}; dataGridView1.Rows.Add(row); } } catch (Exception exc) { MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } finally { Cursor.Current = Cursors.Default; sqlConnection.Close(); if (sqlReader != null) { sqlReader.Dispose(); sqlReader = null; } if (sqlCommand != null) { sqlCommand.Dispose(); sqlCommand = null; } } }
object[] row = { sqlReader[0]};
messagebox.show("code check");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)