CDatabase m_LoginDatabase;
try
{
m_LoginDatabase.OpenEx(_T("DSN=student;UID='';PWD=''"));
}
catch (CDBException *e)
{
MessageBox(NULL, "连接数据数据源失败!", "提示", MB_OK);
e->Delete();
}
CRecordset m_LoginSet(&m_LoginDatabase);
try{
m_LoginSet.Open(CRecordset::dynaset,_T("Select * from student"));
}
catch (CDBException *e)
{
MessageBox(NULL, "打开记录集失败!", "提示", MB_OK);
e->Delete();
}
while (!m_LoginSet.IsEOF())
{
m_LoginSet.AddNew();///添加新记录
我不知道后面怎么办了,现在我的CRecordset 是没有绑定的
或者是怎样对CRecordset 进行绑定,因为我是新手,请多多指教!
try
{
m_LoginDatabase.OpenEx(_T("DSN=student;UID='';PWD=''"));
}
catch (CDBException *e)
{
MessageBox(NULL, "连接数据数据源失败!", "提示", MB_OK);
e->Delete();
}
CRecordset m_LoginSet(&m_LoginDatabase);
try{
m_LoginSet.Open(CRecordset::dynaset,_T("Select * from student"));
}
catch (CDBException *e)
{
MessageBox(NULL, "打开记录集失败!", "提示", MB_OK);
e->Delete();
}
while (!m_LoginSet.IsEOF())
{
m_LoginSet.AddNew();///添加新记录
我不知道后面怎么办了,现在我的CRecordset 是没有绑定的
或者是怎样对CRecordset 进行绑定,因为我是新手,请多多指教!
m_LoginSet.update();
好That's OK.
'field1' : is not a member of 'CRecordset'
这是怎么回事啊