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.
shl_tianPosted Jun 21, 2004, 10:32 PM
mikerPosted Jun 18, 2004, 10:27 AM
wdulkerPosted Jun 18, 2004, 2:00 AM
soonhuat81Posted Jun 17, 2004, 10:35 PM
abcPosted Jun 17, 2004, 7:59 AM
jamesPosted Jun 17, 2004, 7:58 AM