Tips for Working with Cursors

Some providers, such as SQL Server, implement a forward-scrolling, read-only (or 'firehose') cursor mode, meaning that they can efficiently retrieve data by keeping a connection open. When working with such providers, the connection could be blocked by another user's transaction. The following examples demonstrate scenarios that result in errors.

dbConn.Open "DSN=SQLForum;UID=sa;PWD=;"        'Example 1
dbConn.BeginTrans
RS.Open "SELECT * FROM Message", dbConn
Set dbCmd.ActiveConnection = dbConn

© 1997 by Wrox Press. All rights reserved.