急,在线等!!数据库问题
各位大哥,问一个问题
用ADO+DataGrid显示数据库内容的的时候怎么让DataGrid与数据库联系起来,如下程序,最后的问号处应该添什么?
使用Ado 智能指针
_ConnectionPtr m_pConnection;
_RecordsetPtr m_pRecordset;
CDataGrid m_DataGrid1;
//建立连接、打开数据源
...
//如何使打开的数据与DataGrid控件关联
m_DataGrid1.SetRefDataSource(?);