oledbconnection conn = getconn(); //getconn():得到连接对象 oledbdataadapter adapter = new oledbdataadapter("select * from notes order by posttime desc",conn); system.data.dataset mydataset = new system.data.dataset();; //定义dataset adapter.fill(mydataset,"notes"); conn.close();