问题1:
testdatabase.Open("SQLDATA1",false,false,"ODBC;UID=ADMIN",false);
CRecordset re(&testdatabase);
re.Open(CRecordset::dynaset, _T("[dbo].[student]"),CRecordset::readOnly);
re.Move(2);
re.Close();
为什么?re.Open......语句有问题,好象说是找不到column.....(记不清楚了)因为我的表在变,不要用固定的CRecordset派生类,CMyRecordset::public CRecordset,因为我的列会变化的.
应该如何改????问题2:
我用Visual c++ 6.0 APPWIZARD 创建了一个数据库工程,连接到远端的SQL Server 2000数据库,不过,
我发现用它产生出来的派生CRecordset类,我用的是dynaset,不能进行delete操作:m_pSet->Delete(),它说是Readonly.但是我是可以用CDatabase::ExecSQL("delete from db1..student where id='liyi'")来删除的,请问???怎么解决???谢谢..