|
蓝森林 http://www.lslnet.com 2006年6月6日 10:18
请教一个数据库的问题
请教一个数据库的问题
通过ADO进行连接 ,好象连接上了但如何提取STREET 表中的A字段显示在一个文本框中
我实在写不下去了
void rxgasid::OnBnClickedButton1()
{
rxgasid ttt;
_ConnectionPtr db;
_CommandPtr m_pCommand;
CString sql="select * from street";
db.CreateInstance(__uuidof(Connection));
db->;Open("Provider=sqloledb;server=infodb;DataBase=infodb;uid=sa;pwd=1111","","",-1);
_RecordsetPtr m_pUserSet;
m_pUserSet.CreateInstance (__uuidof(Recordset));
m_pUserSet->;Open("select * from street",theApp.db.GetInterfacePtr(), adOpenDynamic, adLockOptimistic,adCmdText);
........
//如何显示到文本框中
}
谢谢:) |
| |