Web Development

General discussion


SQL Timeout with VC++ cRecordSet

By martin ·
I have a VC 6.00 app that adds a record to an SQL table using the cRecordSet class, usually it works but sometimes it throws a timeout exception, I cant seem to find a way of increasing this timeout, can anybody help?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

SQL Timeout with VC++ cRecordSet

by dljohnston In reply to SQL Timeout with VC++ cRe ...

The CRecordset object should have a member variable m_pDatabase. You could try this before adding records.

CRecordset.m_pDatabase->SetQueryTimeout(dwSeconds); //making sure that dwSeconds is sufficiently long so as not to timeout.
This should affect all the subsequent adds,deletes, etc.


Related Discussions

Related Forums