Link to home
Start Free TrialLog in
Avatar of Gossip
Gossip

asked on

SQL server Cursor

Hi,

I use the following code to connect to SQL Server. but when I use edit() function of CRecordset to update a record in databse, it reports error.

//connect to DB
m_Database.OpenEx( ConnectionString, CDatabase::noOdbcDialog )

//update records
m_pRecordset->Edit(); <-- report a "DBCore.cpp line 66 assertion"
m_pRecordset->Update();
 
later, I change the connection as:
m_Database.OpenEx( ConnectionString, CDatabase::noOdbcDialog | CDatabase::useCursorLib))

then it works fine.

My question is:
1> Does the edit() function use a cursor?
2>SQL server Driver itself supports cursor ability, why I have to use other cursor library?
3> how do I use the SQL server driver's cursor ability?

Could you give some code example? I am using vc++

Thanks,

Gossip


ASKER CERTIFIED SOLUTION
Avatar of xenon_je
xenon_je

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CleanupPing
CleanupPing

Gossip:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added to this question in more than 268 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: xenon_je http:#8180398

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

monosodiumg
EE Cleanup Volunteer