Click or drag to resize

SQLStatement Class (Typed)

X#
Manage a SQL statement.
Inheritance Hierarchy
Object
  SQLStatement

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOSQLClasses (in XSharp.VOSQLClasses.dll) Version: 2.19
Syntax
[TypesChangedAttribute]
 CLASS SQLStatement
Request Example View Source

The SQLStatement type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleSQLStatement
Construct a SQLStatement object.
Top
Properties
  NameDescription
Public propertyConnection
The data source — a SQLConnection object — that this statement is connected to.
Public propertyCursorType Obsolete.
Public propertyErrInfo
An SQL statement error information (SQLErrorInfo) object. Use the error flag of the returned object to determine if an error occurred.
Public propertyHyperLabel
A hyperlabel containing a description of the statement.
Public propertyKeySet Obsolete.
Public propertyNativeSQL
A string containing the native text of the statement. Level 2
Public propertyNumParameters
A numeric value containing the number of parameters in the statement. A return value of -1 indicates an error. Level 2
Public propertyNumSuccessfulRows
A numeric value containing the number of rows that were affected by the insert, update, or delete statement. A return value of -1 indicates an error.
Public propertyParams
Public propertyPrepFlag
A logical value that indicates if the statement has been prepared.
Public propertyRecCount
Public propertyRowSet Obsolete.
Public propertySchema
Public propertyScrollConcurrency Obsolete.
Public propertySimulateCursor Obsolete.
Public propertySQLString
A string containing the text of the statement.
Public propertyStatementHandle
A long integer representing the statement handle.
Public propertyStatus
A hyperlabel describing the error, or NULL_OBJECT if no error has occurred.
Public propertyTable
Top
Functions
  NameDescription
Public method_CreateDBParameter
Public methodCommit
Save the changes made since the last Commit().
Public methodDestroy
Public methodCode exampleExecute
Execute the statement.
Public methodStatic memberFillErrorHandler
Public methodFreeStmt
Free the statement, according to the specified option.
Public methodGetStatementOption Obsolete.
Return current setting for a statement option or NIL, if an error occurred.
Public methodMakeErrorInfo
Public methodPrepare
Prepare a statement.
Public methodSetStatementOption Obsolete.
Set current setting for a statement option.
Top
Examples
The following example demonstrates the use of the SQLStatement class:
X#
 1FUNCTION CreateTable()
 2LOCAL oStmt AS SQLStatement
 3LOCAL oConn AS SQLConnection
 4oConn := SQLConnection{"sample","dba","sql"}
 5oStmt := SQLStatement{"Create table test ;
 6(Col1 INT,Col2 Char(10))", oConn}
 7IF !oStmt:Execute()
 8oStmt:ErrInfo:ShowErrorMsg()
 9ENDIF
10oStmt:FreeStmt(SQL_DROP)
11oConn:Disconnect()
See Also