Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does anyone know how CDatabase::useCursorLib matters?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,
We have an MFC application that accesses a SQL server database. The application connects to the database with useCursorLib option to get support of snapshot cursor. All record set classes derived from CRecordset use default AFX_DB_USE_DEFAULT_TYPE to in CRecordset::Open(). I found that CRecordset::MoveNext() is much slower with CDatabase::userCursorLib than that without it.
What will happen if I do not specify "useCursorLib" in CDatabase::OpenEx() but use AFX_DB_USE_DEFAULT_TYPE in CRecordset::Open() (I assume AFX_DB_USE_DEFAULT_TYPE will be snapshot recordset)? How do these two options in the two classes correlate?
From MSDN, I read the following statement: "If your driver already supports static cursors, you don’t need to load the cursor library to get snapshot support". Does SQL server support static cursors?

Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top