Understand the availability and properties of Sybase cursors

Source: Internet
Author: User
Tags odbc sybase server memory

The availability of cursors

Not all interfaces provide support for all cursor types.

ODBC and Ole DB (ADO) support all cursor types.

Embedded SQL supports all cursor types.

Ado. NET provides only forward-only, read-only cursors.

For JDBC

Jconnect 4.x only provides sensitive, unshaped cursors.

Jconnect 5.x supports all types of cursors, but scrollable cursors can cause significant performance degradation.

The ianywhere JDBC driver supports all types of cursors.

The Sybase Open client only supports sensitive, unshaped cursors. In addition, there is a significant performance degradation when using updatable, non-unique cursors.

Cursor Properties

You can request a cursor type explicitly or implicitly from a programming interface. Different interface libraries provide different cursor type selections. For example, JDBC and ODBC specify different cursor types.

Each cursor type is defined by a number of attributes:

Uniqueness declaration a cursor is unique will force the query to return all the columns required to uniquely identify each row. Typically, this means that all columns in the primary key are returned. Any columns that are required, but not specified, are added to the result set. The default cursor type is unique.

A cursor that is declared to be read-only cannot be used in a positioned update or delete operation.

The default cursor type is updatable.

Scrollable you can declare a cursor like this: When you move in the result set, it behaves differently. Some cursors can read only the current or subsequent rows. Some other cursors can move back and forth in the result set.

Sensitivity

You may see changes to the database through the cursor, perhaps not.

These features can have a significant side effect on performance and the use of database server memory.

Adaptive Server Anywhere can produce cursors that have a variety of mixed attributes in these attributes. When you request a cursor of a given type, adaptive Server anywhere matches those attributes as much as possible.

In some cases, not all attributes are available. For example, an insensitive cursor in adaptive Server anywhere must be read-only. If your application requests an updatable, insensitive cursor, the other types of cursors are provided to it

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.