Get data from database and display it on the grid ERROR
I try to get the data from the database and then display it in gridcontrol, but it seems like not working..
I already created the dtArea table in dataset1, and here is the code i write :
private void Form1_Load(object sender, System.EventArgs e)
{
sqlConnection1.ConnectionString = " .....MyConnectionString....";
sqlConnection1.Open();
sqlDataAdapter1.Fill(this.dataSet1, "dtArea");
sqlConnection1.Close();
gridControl1.DataSource = dtArea;
}
Whenever i run the program, the system stop at sqlDataAdapter.Fill(this.dataset, "dtArea") statement ... and the error message is as follwing:
"An unhandled exception of type 'System.Data.SqlClient.SqlException" occured in system.data.dll.
Additional information : System error "
Can anyone help as i've tried so many times but still it's not working. Thanks in advance for the help.

jamesRank #1,153 · 1.6K reputationPosted Jun 17, 2004, 3:58 AM EDT
abc28 reputationPosted Jun 17, 2004, 3:59 AM EDT
soonhuat8137 reputationPosted Jun 17, 2004, 6:35 PM EDT
wdulker8 reputationPosted Jun 17, 2004, 10:00 PM EDT
mikerRank #2,843 · 502 reputationPosted Jun 18, 2004, 6:27 AM EDT
shl_tian12 reputationPosted Jun 21, 2004, 6:32 PM EDT