MDAC 2.5 SDK - ODBC Samples


 

Cursor Demo Sample

Cursor Demo takes advantage of the block cursor, scrolling, positioned update, and delete capabilities of the ODBC Cursor Library. For more information about the ODBC Cursor Library, see the ODBC Programmer's Reference.

Features

Scrollable Result Set Windows

This feature provides a scrolling window over a result set. Individual rows in the result set can be selected and updated if the data source supports positioned updates. Result sets can be generated either by queries or by activating the ODBC functions that return a result set, such as SQLTables.

Each Results window is an MDI child window of the Connection window in which the operation was performed. This means that disconnecting from a Connection window closes all Results windows created from that Connection window.

Statement Options Dialog Box

Optional run modes are configurable with the Stmt menu's Options command. The Options dialog box is dynamic. Selecting an option changes the dialog box configuration to match the requirements of the option.

Multithreaded Support for Microsoft Windows NT/Windows 2000

Cursor Demo supports multithreading under Windows NT/Windows 2000 when compiled with the "thread" option. For more information about compiling with the "thread" option, see "How to Build Cursor Demo" later in this guide.

Limitations

One Active Connection Window

Cursor Demo can open only single connections. If the driver has the capability, Cursor Demo will support multiple statements over the connection.

Number of Rows Fetched and Rowset Size

The maximum number of rows Cursor Demo displays is set using the Stmt menu's Options command. The Rowset Size option defaults to 10; the maximum is 65500.

Simplistic Memory Management

Cursor Demo does not handle out-of-memory conditions very gracefully. Make sure you have sufficient memory to run the program and load your data.