读书人

待求帮忙!解决有关问题分数瞬给

发布时间: 2012-04-27 11:57:44 作者: rapoo

在线等待求大虾帮忙!!解决问题分数瞬给

pBuf=222;
CRecordset rs(&db);
CString strSql;
strSql = _T("delete ini where line = pBuf");
//SQL语句
rs.Open(AFX_DB_USE_DEFAULT_TYPE, strSql);
我想删除222 line是字段名 应该怎么改!!!!
Open(AFX_DB_USE_DEFAULT_TYPE, strSql) 这个语句是什么意思???

[解决办法]
Opens the recordset by retrieving the table or performing the query that the recordset represents.

You must call this member function to run the query defined by the recordset. Before calling Open, you must construct the recordset object.

This recordset's connection to the data source depends on how you construct the recordset before calling Open. If you pass a CDatabase object to the recordset constructor that has not been connected to the data source, this member function uses GetDefaultConnect to attempt to open the database object. If you pass NULL to the recordset constructor, the constructor constructs a CDatabase object for you, and Open attempts to connect the database object. For details on closing the recordset and the connection under these varying circumstances, see Close.

读书人网 >C++

热点推荐