Try
{
Conn. The Open ();
OleDbDataAdapter oled;
String SQL="select * from LDZZ_PY_LDXB";
OleDbCommand comm=new OleDbCommand (SQL, conn);
OleDbDataAdapter oadp=new OleDbDataAdapter (comm);
//query table if there is a
Oled=new OleDbDataAdapter (" select * from LDZZ_PY_LDXB ", conn);
The DataSet ds=new DataSet ();
Oled. The Fill (ds);
Enclosing dataGridView1. The DataSource=ds. Tables [0].
}
Catch
{
//table does not exist
Conn. Close ();
MessageBox. Show (" not query to "LDZZ_PY_LDXB" table ");
}


CodePudding user response:
Is a c + + in the plate, can be turned to look at the c # plates,It is out of memory, you only find a try,
To have a help for you to take a look at this http://bbs.csdn.net/topics/350084036
CodePudding user response:
MFC, quite a application, binding database, and then the View selected DataGridView, most of the code to help you generate good, can for your reference