Help Center

CODBCStmt.SetCursorNamemethod

Sets the cursor name associated with a specified statement.

DatabasesmethodCODBCStmt.incdocumented

Syntax

FUNCTION SetCursorName (BYREF wszCursorName AS WSTRING) AS SQLRETURN

Parameters

NameDescription
wszCursorNameCursor name. For efficient processing, the cursor name should not include any leading or trailing spaces in the cursor name, and if the cursor name includes a delimited identifier, the delimiter should be positioned as the first character in the cursor name.

Return value

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.

Description

Sets the cursor name associated with a specified statement.

Example

#include once "AfxNova/COdbc.inc" USING AfxNova

' // Connect with the database DIM wszConStr AS WSTRING * 260 = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=biblio.mdb" DIM pDbc AS CODBC = wszConStr

' // Allocate an statement object DIM pStmt AS COdbcStmt = @pDbc IF pStmt.Handle = NULL THEN PRINT "Failed to allocate the statement handle": SLEEP : END

' // Cursor type pStmt.SetMultiuserKeysetCursor ' // Sets the cursor name pStmt.SetCursorName "MyCursor" ' // Gets the cursor name PRINT "Cursor name: " & pStmt.GetCursorName

Reference

  • Include file CODBCStmt.inc
  • Defined in AfxNova/COdbcStmt.inc:604
  • Documented in Databases/ODBC Classes/CODBCStmt Class.md
  • Topic: CODBCStmt Class