From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:45:21 pm (Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned. Choose terminate or close.'] <class> <name>ODBCConnection</name> <environment>Database</environment> <super>Database.ExternalDatabaseConnection</super> <private>false</private> none hdbcHolder supportedFunctions generalInformationCache encoding unicodeEncoding <imports></imports> <category>Database-ODBC</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <comment> Database.ODBCConnection
ODBCConnection is the concrete class implementation of connection services using the ODBC library. Instance Variables: generalInformationCache <IdentityDictionary> Maps api information id, to info value, e.g., dbms version. hdbcHolder <Value> A value holder for the environment handle which identifies this connection. supportedFunctions <IdentityDictionary> Maps ODBC api functional capability id to True or False. encoding <Symbol> A symbol remembers the encoding selection. unicodeEncoding <Symbol> A symbol remembers the encoding selection for the Unicode strings. Shared Variables: Henv <CPointer | nil> A pointer for environment handle, if any. HenvLock <RecursionLock> A lock for protecting shared resources HenvReferencesCount <Integer> Indicates number of connections referencing the environment handle. RegisteredODBCConnections <Collection> The collection of active connections.. SQLInfoTypeConversionMap <IdentityDictionary> A set of associations between SQL information types and conversion message names. SupportedIsolationLevels <IdentityDictionary> A dictionary of supported isolation levels. ConnectionPooling <Boolean> Indicates whether connection pooling is wanted. ConnectionsArePooled <Boolean> Indicates whether connection pooling is on. CpStrictMatch <Boolean> Indicates whether strict match or relaxed match is wanted for connection pooling.
</comment> <class> <name>ODBCTransaction</name> <environment>Database</environment> <super>Database.ExternalDatabaseTransaction</super> <private>false</private> none <imports></imports> <category>Database-ODBC</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <class> <name>ODBCError</name> <environment>Database</environment> <super>Database.ExternalDatabaseError</super> <private>false</private> none sqlState <imports></imports> <category>Database-ODBC</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <class> <name>ODBCCLIInterface</name> <environment>Database</environment> <super>External.ExternalInterface</super> <private>false</private> none encoding getSelectorMap fSqlTypeToConversionMap fetchBufferSizeBlocks putSelectorMap fCTypeFromConversionMap fSqlTypeFromConversionMap valueSizeBlocks valuePrecisionBlocks dataChunkSize <imports> Database.ODBCCLIInterfaceDictionary.* </imports> <category>Database-External-Libraries</category> <attributes> <includeFiles></includeFiles> <includeDirectories></includeDirectories> <libraryFiles></libraryFiles> <libraryDirectories></libraryDirectories> true full <package>ODBCEXDI</package> </attributes> </class> <comment> Database.ODBCCLIInterface
ODBCCLIInterface defines calling the conventions for the ODBC API. Instance Variables: encoding <Symbol> A symbol remembers the encoding selection.
</comment> <class> <name>ODBCCLINTInterface</name> <environment>Database</environment> <super>Database.ODBCCLIInterface</super> <private>false</private> none <imports> Database.ODBCCLINTInterfaceDictionary.* </imports> <category>Database-External-Libraries</category> <attributes> <includeFiles></includeFiles> <includeDirectories></includeDirectories> <libraryFiles><item>odbc32.dll</item></libraryFiles> <libraryDirectories></libraryDirectories> false full <package>ODBCEXDI</package> </attributes> </class> <comment> Database.ODBCCLINTInterface
ODBCCLINTInterface defines the ODBC calling conventions on Windows NT.
</comment> <class> <name>ODBCCLI95Interface</name> <environment>Database</environment> <super>Database.ODBCCLINTInterface</super> <private>false</private> none <imports> Database.ODBCCLI95InterfaceDictionary.* </imports> <category>Database-External-Libraries</category> <attributes> <includeFiles></includeFiles> <includeDirectories></includeDirectories> <libraryFiles><item>odbc32.dll</item> <item>odbc32.dll</item></libraryFiles> <libraryDirectories></libraryDirectories> false full <package>ODBCEXDI</package> </attributes> </class> <comment> Database.ODBCCLI95Interface
ODBCCLI95Interface defines the ODBC calling conventions on Windows 95 and 98.
</comment> <class> <name>ODBCBuffer</name> <environment>Database</environment> <super>Database.ExternalDatabaseBuffer</super> <private>false</private> none bufferValue bufferIndex bufferSession fParamType cbColDef ibScale cbValueMax pcbValue getSelector putSelector unicode <imports></imports> <category>Database-Private-ODBC Buffers</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <comment> Database.ODBCBuffer
ODBCBuffer is a private subclass, and extends ExternalDatabaseBuffer to deal with ODBC. Intimate details are shared with ODBCSession. All CPointers managed by ODBCBuffer are assumed to not be automatically garbage collectable. Clients are responsible for explicitly freeing the space. Instance Variables: bufferIndex <Object> Bind position in query. bufferSession <ODBCSession> The ODBCSession which owns self (this buffer). bufferValue <Object> Smalltalk object held by this buffer. cbColDef <SmallInteger> How many bytes (or characters) used for variable C data. cbValueMax <ArithmeticValue> How many bytes (or characters) used for C data. fParamType <SmallInteger> Flag indicating bound for input (to db) or output, or both. getSelector <method> Method which converts retrieved C data, and returns Smalltalk object. ibScale <SmallInteger> For FixedPoint objects, the scale. pcbValue <CPointer> Pointer to size of C data (cb is like count of bytes). putSelector <method> Method which converts Smalltalk object to C data. unicode <Boolean> For Strings, indicates whether unicode or not.
</comment> <class> <name>ODBCLargeObjectBuffer</name> <environment>Database</environment> <super>Database.ODBCBuffer</super> <private>false</private> none <imports></imports> <category>Database-Private-ODBC Buffers</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <comment> Database.ODBCLargeObjectBuffer
ODBCLargeObjectBuffer is a private subclass, and extends ODBCBuffer to send and retrieve data by chunks. This is appropriate for large objects like Strings and ByteArrays. Normally, data bound to an ODBC query is transferred automatically when the query is executed. But large objects need to be transferred after execution, in concert with the server. This is called binding at execution, in contrast to the usual binding before execution. This class can be used to hold regular objects or large objects. Sometimes regular objects also need to be bound at execution. For example, there is an optional ODBC implementation which requires all bound objects which appear in the query after a large object to be bound this way. ODBCSession checks for this requirement by the server, and selects this class as appropriate.
</comment> <class> <name>ODBCException</name> <environment>Database</environment> <super>Database.ExternalDatabaseException</super> <private>false</private> none <imports></imports> <category>Database-ODBC</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <comment> Database.ODBCException
ODBCException is raised in case of an ODBC error.
</comment> <class> <name>UnableToSetStatementOptions</name> <environment>Database</environment> <super>Database.ODBCException</super> <private>false</private> none <imports></imports> <category>Database-ODBC</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <comment> Database.UnableToSetStatementOptions
UnableToSetStatementOptions is used to indicate that error occurs when setting a statement option.
</comment> <class> <name>ODBCColumnDescription</name> <environment>Database</environment> <super>Database.ExternalDatabaseColumnDescription</super> <private>false</private> none fSqlType <imports></imports> <category>Database-ODBC</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <class> <name>ODBCDataSource</name> <environment>Database</environment> <super>Core.Object</super> <private>false</private> none name description <imports></imports> <category>Database-Private-ODBC Support</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <class> <name>ODBCSession</name> <environment>Database</environment> <super>Database.ExternalDatabaseSession</super> <private>false</private> none hstmtHolder resultsCache bindValuePointers mustResendQueryHolder fetchLongResultsAnyOrder maxLongData sqlStatementOptionCache queryIsPROC unicode encoding unicodeEncoding <imports></imports> <category>Database-ODBC</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <comment> Database.ODBCSession
ODBCSession contains the ODBC-specfic protocols for the External Database Interface (EXDI). By using this package with a properly-configured ODBC client, Windows apps can interact with Database servers. Further information on the EXDI framework can be found in the "Database Application Developer''s Guide" (located in the /doc subdirectory of the VisualWorks installation). Instance Variables: bindValuePointers <Dictionary> Maps position (in query) to corresponding bind object, an ODBCBuffer. fetchLongResultsAnyOrder <Boolean> Indicates whether all objects positioned after a large object must be fetched after execution. hstmtHolder <ValueModel> Holds ODBC statement handle used to identify this session. maxLongData <SmallInteger> Max number of bytes to read from long columns. mustResendQueryHolder <ValueModel> Indicates whether cursor was dropped and must be prepared again. resultsCache <Collection> Holds statement errors until they are processed. sqlStatementOptionCache <IdentityDictionary> Maps formal statement options, if supported by db. queryIsPROC <Boolean> True if this query calls a stored procedure, else False. unicode <Boolean> indicates whether the binding strings are unicode or not. encoding <Symbol> A symbol remembers the encoding selection. unicodeEncoding <Symbol> A symbol remembers the encoding selection for the Unicode strings.
</comment> <class> <name>ODBCDataType</name> <environment>Database</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Database-Private-ODBC Support</category> <attributes> <package>ODBCEXDI</package> </attributes> </class> <name>FetchBufferSizeBlocks</name> <environment>Database.ODBCBuffer</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>CTypeFromConversionMap</name> <environment>Database.ODBCBuffer</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>PutSelectorMap</name> <environment>Database.ODBCBuffer</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>SQLTypeFromConversionMap</name> <environment>Database.ODBCBuffer</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>ValueSizeBlocks</name> <environment>Database.ODBCBuffer</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>GetSelectorMap</name> <environment>Database.ODBCBuffer</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>ValuePrecisionBlocks</name> <environment>Database.ODBCBuffer</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>ConnectionsArePooled</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>HenvReferencesCount</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>Henv</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>ConnectionPooling</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>RegisteredODBCConnections</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>SQLInfoTypeConversionMap</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>CpStrictMatch</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>HenvLock</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>SupportedIsolationLevels</name> <environment>Database.ODBCConnection</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>SQLStatementOptionConversionMap</name> <environment>Database.ODBCSession</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>RegisteredODBCSessions</name> <environment>Database.ODBCSession</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <name>DefaultMaxLongData</name> <environment>Database.ODBCSession</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ODBCEXDI</package> </attributes> <methods> Database.ODBCConnection <category>private-accessing</category>
generalInformationCache ^generalInformationCache
generalInformationCache: anIdentityDictionary generalInformationCache := anIdentityDictionary
getConnectionErrors "Return a non-empty collection of ODBCError(s) associated with the connection handle." | xif errors err | xif := self class xif. errors := OrderedCollection new. [(err := self getErrorsExternal: xif SQL_NULL_HENV hdbc: self hdbc hstmt: xif SQL_NULL_HSTMT) notNil] whileTrue: [errors add: err]. "Many senders assume non-empty collection." errors isEmpty ifTrue: [err := self class defaultError. errors add: err]. ^errors
getEnvironmentErrors "Answer a non-empty collection of ODBCError(s) associated with the environment handle." | xif errors err | xif := self class xif. errors := OrderedCollection new. HenvLock critical: [ "Begin critical section." [ (err := self getErrorsExternal: self class henv hdbc: xif SQL_NULL_HDBC hstmt: xif SQL_NULL_HSTMT) notNil ] whileTrue: [ errors add: err ]. "End critical section." ]. "Many senders assume non-empty collection." errors isEmpty ifTrue: [err := self class defaultError. errors add: err]. ^errors
getInformationType: anInfoTypeSymbol "Answer driver sql type information" | gic | ^(gic := self generalInformationCache) at: anInfoTypeSymbol ifAbsent: [ | infoType | infoType := self getInformationTypeExternal: anInfoTypeSymbol. gic at: anInfoTypeSymbol put: infoType. infoType ].
hdbc ^self hdbcHolder value
hdbc: aCPointerOrNil self hdbcHolder value: aCPointerOrNil
hdbcHolder ^hdbcHolder
hdbcHolder: aValueHolder hdbcHolder := aValueHolder
isolationLevel: newIsolationLevel "Set the current isolation level." | externalIsolationLevel | externalIsolationLevel := SupportedIsolationLevels at: newIsolationLevel ifAbsent: [ExternalDatabaseConnection unsupportedIsolationLevelSignal raise]. self isConnected ifTrue: [self setIsolationLevel: externalIsolationLevel]. isolationLevel := newIsolationLevel
supportedFunctions ^supportedFunctions
supportedFunctions: anIdentityDictionary supportedFunctions := anIdentityDictionary
supportsFunction: fFunctionSymbol "Answer if the attached driver supports the given function" | sf | ^(sf := self supportedFunctions) at: fFunctionSymbol ifAbsent: [ | supported | supported := self getSupportedFunctionExternal: fFunctionSymbol. sf at: fFunctionSymbol put: supported. supported ]
useDriverConnect: anEnvironmentString "Returns true if using the connect string to connect." ^(('DRIVER={*' match: anEnvironmentString) or: [ 'DSN=*' match: anEnvironmentString ]) or: [ 'FILEDSN=*' match: anEnvironmentString ]
</methods> <methods> Database.ODBCConnection <category>accessing</category>
dataSources "Return a List of accessible ODBCDataSource instances. The receiver does not need to be connected." | xif dataSources fDirection ds | xif := self class xif. "If we don't have an environment handle allocated, get one now." HenvLock critical: [ self unprotectedAddHenvReference ]. [ "Begin unwind protection." dataSources := List new. fDirection := xif SQL_FETCH_FIRST. [ (ds := self getDataSourceExternal: fDirection) notNil ] whileTrue: [ fDirection := xif SQL_FETCH_NEXT. dataSources add: ds ]. "End unwind protection." ] ensure: [ HenvLock critical: [ self unprotectedDropHenvReference ] ]. ^dataSources
dbmsName "Answer the name of the DBMS product being accessed" ^self getInformationType: #SQL_DBMS_NAME.
dbmsVersion "Answer the version of the DBMS product being accessed" ^self getInformationType: #SQL_DBMS_VER.
delimitedIdentifierCharacter "Answer the delimiter of the DBMS product being accessed a space indicates no delimited identifiers supported" ^self getInformationType: #SQL_IDENTIFIER_QUOTE_CHAR.
encoding encoding isNil ifTrue: [ encoding := self class xif encoding ]. ^encoding
encoding: anEncoding encoding := anEncoding
supportsDelimitedIdentifiers "Answer whether the DBMS product being accessed supports double quoted identifiers" ^((self getInformationType: #SQL_IDENTIFIER_QUOTE_CHAR) = '"').
unicodeEncoding unicodeEncoding isNil ifTrue: [ unicodeEncoding := #'UCS-2' ]. ^unicodeEncoding
unicodeEncoding: anEncoding unicodeEncoding := anEncoding
</methods> <methods> Database.ODBCConnection <category>printing</category>
printOn: aStream | hdbc | super printOn: aStream. ((hdbc := self hdbc) isNil or: [hdbc referentAddress isNil]) ifFalse: [ aStream nextPutAll: '( hdbc = '; nextPutAll: (hdbc referentAddress printStringRadix: 16); nextPutAll: ' )' ]
</methods> <methods> Database.ODBCConnection <category>private-execution</category>
acquireExternal: aPassword | xif name pw env rc | xif := self class xif. (env := self environment) isNil ifTrue: [env := self class defaultEnvironment]. [env isString] whileFalse: [env := self class requiredEnvironmentSignal raiseRequest]. env := self class mapLogical: env. "Get required handles." HenvLock critical: [self unprotectedAllocConnect]. ["Begin unwind protection -- ensure release of connection handle on failure." rc := (self useDriverConnect: env) ifTrue: [ self acquireExternalUsingDriverConnectEnvironment: env ] ifFalse: [ name := self username. [name isString] whileFalse: [name := self class requiredUsernameSignal raiseRequest]. pw := aPassword. [pw isString] whileFalse: [pw := self class requiredPasswordSignal raiseRequest]. self acquireExternalUsingConnectName: name password: pw environment: env]. (rc == xif SQL_SUCCESS or: [rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getConnectionErrors. ^self class unableToConnectToSQLserverSignal raiseWith: errs errorString: errs first dbmsErrorString] "End unwind protection"] ifCurtailed: ["Some failure is causing unwind, don't keep the handles." HenvLock critical: [ self unprotectedFreeConnect ] ]. "Enter autocommit mode on the transaction." self singleStatementTransactions. "Set the correct isolation level for this connect" "self setIsolationLevel: (SupportedIsolationLevels at: isolationLevel)."
acquireExternalUsingConnectName: aName password: aPassword environment: anEnvironment | xif szDSN szUID szAuthStr env1 nm1 pw1 rc | xif := self class xif. [ "Begin unwind protection -- ensure release of pointers on success or failure." szDSN := (env1 := anEnvironment asByteArrayEncoding: self encoding) perform: xif copyToHeapSelector. szUID := (nm1 := aName asByteArrayEncoding: self encoding) perform: xif copyToHeapSelector. szAuthStr := (pw1 := aPassword asByteArrayEncoding: self encoding) perform: xif copyToHeapSelector. rc := xif SQLConnect: self hdbc with: szDSN with: env1 size with: szUID with: nm1 size with: szAuthStr with: pw1 size. traceLevel >= 1 ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLConnect( hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix: 16); nextPutAll: ', szDSN = '; nextPutAll: anEnvironment; nextPutAll: ', szUID = '; nextPutAll: aName; nextPutAll: ', szAuthStr = ******* )'. self class trace: self emitTrace] "End unwind protection"] ensure: [ szAuthStr notNil ifTrue: [szAuthStr freePointer]. szUID notNil ifTrue: [szUID freePointer]. szDSN notNil ifTrue: [szDSN freePointer] ]. ^ rc
acquireExternalUsingDriverConnectEnvironment: anEnvironment | xif theHwnd encodedEnv szConnStrIn szConnStrOut cbConnStrOutMax pcbConnStrOut fDriverCompletion rc | xif := self class xif. "A sample connect string for driver connect could be as the following" "DRIVER={SQL Server};Database=dbname;UID=username;PWD=password;SERVER=servername;" [ "Begin unwind protection -- ensure release of pointers on success or failure." theHwnd := 0. "Window currentWindow windowHandle" szConnStrIn := (encodedEnv := anEnvironment asByteArrayEncoding: self encoding) perform: xif copyToHeapSelector. cbConnStrOutMax := 1024. szConnStrOut := xif UCHAR perform: xif mallocSelector with: cbConnStrOutMax. pcbConnStrOut := xif SWORD perform: xif mallocSelector with: 1. fDriverCompletion := xif SQL_DRIVER_NOPROMPT. rc := xif SQLDriverConnect: self hdbc with: theHwnd with: szConnStrIn with: encodedEnv size with: szConnStrOut with: cbConnStrOutMax with: pcbConnStrOut with: fDriverCompletion. self class traceLevel >= 1 ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLDriverConnect( hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix: 16); nextPutAll: ' hwnd = '; nextPutAll: (theHwnd printStringRadix: 16); nextPutAll: ', szConnStrIn = '; nextPutAll: szConnStrIn; nextPutAll: ', cbConnStrIn = '; nextPutAll: encodedEnv size; nextPutAll: ', szConnStrOut = '; nextPutAll: szConnStrOut; nextPutAll: ', cbConnStrOutMax = '; nextPutAll: cbConnStrOutMax; nextPutAll: ', pcbConnStrOut = '; nextPutAll: pcbConnStrOut; nextPutAll: ', fDriverCompletion = '; nextPutAll: (fDriverCompletion printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace] "End unwind protection"] ensure: [ szConnStrIn freePointer. szConnStrOut freePointer. pcbConnStrOut freePointer]. ^ rc
beginExternal super beginExternal. self multiStatementTransactions
commitExternal super commitExternal ifFalse: [ ^self ]. self transactExternal: #SQL_COMMIT. self singleStatementTransactions
cursorsAreClosed "Notify each participating session that the cursor was closed by some event (like commit or rollback)." self participantsDo: [ :each | each cursorIsClosed ]
cursorsAreDeleted "Notify each participating session that the cursor was deleted by some event (like commit or rollback)." self participantsDo: [ :each | each cursorIsDeleted ]
dismissExternal | xif rc | xif := self class xif. [ "Begin unwind protection." rc := xif SQLDisconnect: self hdbc . (traceLevel >= 2) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLDisconnect( hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getConnectionErrors. ^self class unableToDisconnectSignal raiseRequestWith: errs ]. "End unwind protection." ] ensure: [ "Whether or not there was a failure, there's no point in hanging onto the handles." HenvLock critical: [ self unprotectedFreeConnect ]. self supportedFunctions: IdentityDictionary new. self generalInformationCache: IdentityDictionary new ]
getDataSourceExternal: fDirection "Return the next piece of error or status information, or NULL if none." | xif cbDSNMax cbDescriptionMax szDSN pcbDSN szDescription pcbDescription rc ds | xif := self class xif. cbDSNMax := xif SQL_MAX_DSN_LENGTH + 1. cbDescriptionMax := 254 + 1. [ "Begin unwind protection." szDSN := xif UCHAR perform: xif mallocSelector with: cbDSNMax. pcbDSN := xif SWORD perform: xif mallocSelector with: 1. szDescription := xif UCHAR perform: xif mallocSelector with: cbDescriptionMax. pcbDescription := xif SWORD perform: xif mallocSelector with: 1. HenvLock critical: [ "Begin critical section." rc := xif SQLDataSources: self class henv with: fDirection with: szDSN with: cbDSNMax with: pcbDSN with: szDescription with: cbDescriptionMax with: pcbDescription. (( rc == xif SQL_SUCCESS ) or: [ rc == xif SQL_SUCCESS_WITH_INFO ] ) ifTrue: [ ds := self class dataSourceClass new. ds name: szDSN copyCStringFromHeap. ds description: szDescription copyCStringFromHeap.] "End critical section." ] "End unwind protection." ] ensure: [ szDSN notNil ifTrue: [ szDSN freePointer ]. pcbDSN notNil ifTrue: [ pcbDSN freePointer ]. szDescription notNil ifTrue: [ szDescription freePointer ]. pcbDescription notNil ifTrue: [ pcbDescription freePointer ] ]. ^ds
getErrorsExternal: henvOrNull hdbc: hdbcOrNull hstmt: hstmtOrNull "Return the next piece of error or status information, or nil if none." | xif szSqlState pfNativeError szErrorMsg cbErrorMsgMax pcbErrorMsg rc error | xif := self class xif. [ "Begin unwind protection." szSqlState := xif UCHAR perform: xif mallocSelector with: xif SQL_SQLSTATE_SIZE + 1. pfNativeError := xif SDWORD perform: xif mallocSelector with: 1. szErrorMsg := xif UCHAR perform: xif mallocSelector with: (cbErrorMsgMax := xif SQL_MAX_MESSAGE_LENGTH + 1). pcbErrorMsg := xif SWORD perform: xif mallocSelector with: 1. rc := xif SQLError: henvOrNull with: hdbcOrNull with: hstmtOrNull with: szSqlState with: pfNativeError with: szErrorMsg with: cbErrorMsgMax with: pcbErrorMsg. rc == xif SQL_SUCCESS ifTrue: [ error := self class errorClass new. error dbmsErrorCode: pfNativeError contents. error dbmsErrorString: szErrorMsg copyCStringFromHeap. error sqlState: szSqlState copyCStringFromHeap. ( traceLevel >= 2 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLError( henv = *, hdbc = *, hstmt = *, szSqlState = '; nextPutAll: error sqlState; nextPutAll: ', pfNativeError = '; print: error dbmsErrorCode; nextPutAll: ', szErrorMsg = '; nextPutAll: error dbmsErrorString; nextPutAll: ', cbErrorMsgMax = '; print: cbErrorMsgMax; nextPutAll: ', pcbErrorMsg = '; print: pcbErrorMsg contents; nextPutAll: ' )'; crtab. self class trace: self emitTrace ] ]. "End unwind protection." ] ensure: [ szSqlState notNil ifTrue: [ szSqlState freePointer ]. pfNativeError notNil ifTrue: [ pfNativeError freePointer ]. szErrorMsg notNil ifTrue: [ szErrorMsg freePointer ]. pcbErrorMsg notNil ifTrue: [ pcbErrorMsg freePointer ] ]. ^error
getInformationTypeExternal: fInfoTypeSymbol "Answer the information associated with fInfoTypeSymbol. This information is defined only after connecting." | xif cbInfoValueMax rgbInfoValue pcbInfoValue rc ub infoValue | xif := self class xif. cbInfoValueMax := 256. "Arbitrary number for a max." [ "Begin unwind protection." rgbInfoValue := xif UCHAR perform: xif mallocSelector with: cbInfoValueMax. pcbInfoValue := xif SWORD perform: xif mallocSelector with: 1. rc := xif SQLGetInfo: self hdbc with: (xif perform: fInfoTypeSymbol) with: rgbInfoValue with: cbInfoValueMax with: pcbInfoValue. (rc == xif SQL_SUCCESS or: [ rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getConnectionErrors. ^self class unableToQueryDriverInformationSignal raiseWith: errs errorString: errs first dbmsErrorString ]. ub := UninterpretedBytes new: pcbInfoValue contents. rgbInfoValue copyAt: 0 to: ub size: ub sizeInBytes startingAt: 1. infoValue := ub perform: (SQLInfoTypeConversionMap at: fInfoTypeSymbol) with: 1 "End unwind protection." ] ensure: [ rgbInfoValue notNil ifTrue: [ rgbInfoValue freePointer ]. pcbInfoValue notNil ifTrue: [ pcbInfoValue freePointer ] ]. ^infoValue
getSupportedFunctionExternal: fFunctionSymbol "Answer a boolean indicating whether the function corresponding to the fFunctionSymbol is supported by the driver. This information is defined only after connecting as the specific driver to use is not defined yet." | xif rc pfSupportedPointer supported | xif := self class xif. [ "Begin unwind protection." pfSupportedPointer := xif UWORD perform: xif mallocSelector with: 1. rc := xif SQLGetFunctions: self hdbc with: (xif perform: fFunctionSymbol) with: pfSupportedPointer. ( traceLevel >= 4 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLGetFunctions( hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix:16); nextPutAll: ', fFunction = '; nextPutAll: fFunctionSymbol; nextPutAll: ', pfSupported ='; print: pfSupportedPointer contents; nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getConnectionErrors. self class unableToQueryDriverInformationSignal raiseWith: errs errorString: errs first dbmsErrorString ]. supported := (pfSupportedPointer contents == 1). "End unwind protection." ] ensure: [ pfSupportedPointer notNil ifTrue: [ pfSupportedPointer freePointer ] ]. ^supported
installExternal super installExternal. self hdbc: nil. self supportedFunctions: IdentityDictionary new. self generalInformationCache: IdentityDictionary new.
multiStatementTransactions "Take the receiver's connection out of auto-commit mode for transaction behavior." "If receiver is connected to a driver which supports control over the autocommit behavior then this is the preferred mechanism for implementing the transaction behavior defined for the EXDI." | xif rc | (self supportsFunction: #SQL_API_SQLSETCONNECTOPTION) ifTrue: [ xif := self class xif. rc := xif SQLSetConnectOption: self hdbc with: xif SQL_AUTOCOMMIT with: xif SQL_AUTOCOMMIT_OFF. ( traceLevel >= 3 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLSetConnectionOption( hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix:16); nextPutAll: ', SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF)'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getConnectionErrors. self class transactionExceptionSignal raiseWith: errs errorString: errs first dbmsErrorString ] ]
rollbackExternal super rollbackExternal ifFalse: [ ^self ]. self transactExternal: #SQL_ROLLBACK. self singleStatementTransactions
setIsolationLevel: anIsolationLevel "Take the receiver's connection out of auto-commit mode for transaction behavior." "If receiver is connected to a driver which supports control over the autocommit behavior then this is the preferred mechanism for implementing the transaction behavior defined for the EXDI." | xif rc | (0 == 0 "self supportsFunction: #SQL_API_SQLSETCONNECTOPTION") ifTrue: [ xif := self class xif. rc := xif SQLSetConnectOption: self hdbc with: xif SQL_TXN_ISOLATION with: (xif perform:anIsolationLevel). ( traceLevel >= 3 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLSetConnectionOption( hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix:16); nextPutAll: ', SQL_TXN_ISOLATION, '; nextPutAll: isolationLevel; nextPutAll: ')'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getConnectionErrors. self class transactionExceptionSignal raiseWith: errs errorString: errs first dbmsErrorString ] ]
singleStatementTransactions "Put the receiver's connection into auto-commit mode for transaction behavior." "If receiver is connected to a driver which supports control over the autocommit behavior then this is the preferred mechanism for implementing the transaction behavior defined for the EXDI." | xif rc | (self supportsFunction: #SQL_API_SQLSETCONNECTOPTION) ifTrue: [ xif := self class xif. rc := xif SQLSetConnectOption: self hdbc with: xif SQL_AUTOCOMMIT with: xif SQL_AUTOCOMMIT_ON. ( traceLevel >= 3 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLSetConnectionOption( hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix:16); nextPutAll: ', SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_ON)'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getConnectionErrors. self class transactionExceptionSignal raiseWith: errs errorString: errs first dbmsErrorString ] ]
transactExternal: fTypeSymbol | xif rc behavior | xif := self class xif. rc := xif SQLTransact: xif SQL_NULL_HENV with: self hdbc with: (xif perform: fTypeSymbol). ( traceLevel >= 1 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLTransact( henv = SQL_NULL_HENV, hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix: 16); nextPutAll: ', fType = '; nextPutAll: fTypeSymbol; nextPutAll: ')'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getConnectionErrors. self class transactionExceptionSignal raiseWith: errs errorString: errs first dbmsErrorString ]. "What are the side effects of the end of the transaction." fTypeSymbol == #SQL_COMMIT ifTrue: [ behavior := self getInformationType: #SQL_CURSOR_COMMIT_BEHAVIOR ]. fTypeSymbol == #SQL_ROLLBACK ifTrue: [ behavior := self getInformationType: #SQL_CURSOR_ROLLBACK_BEHAVIOR ]. behavior == xif SQL_CB_DELETE ifTrue: [ self cursorsAreDeleted ]. behavior == xif SQL_CB_CLOSE ifTrue: [ self cursorsAreClosed ]
</methods> <methods> Database.ODBCConnection <category>private-finalization</category>
executor | ex | ex := super executor. ex hdbcHolder: self hdbcHolder. ex supportedFunctions: IdentityDictionary new. ex generalInformationCache: IdentityDictionary new. ^ex
finalizeExternal (self hdbc isNil or: [self hdbc referentAddress isNil]) ifTrue: [ ^self ]. ( traceLevel >= 1 ) ifTrue: [ self class trace: nil ]. super finalizeExternal
key "The hdbcHolder is unique to the connection and is constant across pause/resume." ^self hdbcHolder
</methods> <methods> Database.ODBCConnection <category>initialize-release</category>
initialize "Establish initial value for instance variables." super initialize. self hdbcHolder: nil asValue. supportedFunctions := IdentityDictionary new. generalInformationCache := IdentityDictionary new. "self isolationLevel: #RR"
</methods> <methods> Database.ODBCConnection <category>private-handles</category>
setConnectionPoolingOff "Set Connection Pooling to Strict Match." | xif rc | xif := self class xif. rc := xif SQLSetEnvAttr: xif SQL_NULL_HENV with: xif SQL_ATTR_CONNECTION_POOLING with: xif SQL_CP_OFF with: xif SQL_IS_INTEGER. traceLevel >= 3 ifTrue: [(self traceStream) print: rc; nextPutAll: ' = SQLSetEnvAttr( SQL_NULL_HENV'; nextPutAll: ', SQL_ATTR_CONNECTION_POOLING'; nextPutAll: ', SQL_CP_OFF'; nextPutAll: ', SQL_IS_INTEGER'; nextPutAll: ' )'. self class trace: self emitTrace]. rc == xif SQL_SUCCESS ifFalse: [^self class unableToSetEnvironmentAttributeSignal raise]. self class connectionsArePooled: false
setConnectionPoolingOn "Set Connection Pooling to Strict Match." | xif rc | xif := self class xif. rc := xif SQLSetEnvAttr: xif SQL_NULL_HENV with: xif SQL_ATTR_CONNECTION_POOLING with: xif SQL_CP_ONE_PER_HENV with: xif SQL_IS_INTEGER. traceLevel >= 3 ifTrue: [(self traceStream) print: rc; nextPutAll: ' = SQLSetEnvAttr( SQL_NULL_HENV'; nextPutAll: ', SQL_ATTR_CONNECTION_POOLING'; nextPutAll: ', SQL_CP_ONE_PER_HENV'; nextPutAll: ', SQL_IS_INTEGER'; nextPutAll: ' )'. self class trace: self emitTrace]. rc == xif SQL_SUCCESS ifFalse: [^self class unableToSetEnvironmentAttributeSignal raise]. self class connectionsArePooled: true
setCPToRelaxedMatch "Set Connection Pooling to Strict Match." | xif rc | xif := self class xif. rc := xif SQLSetEnvAttr: self class henv with: xif SQL_ATTR_CP_MATCH with: xif SQL_CP_RELAXED_MATCH with: xif SQL_IS_INTEGER. traceLevel >= 3 ifTrue: [(self traceStream) print: rc; nextPutAll: ' = SQLSetEnvAttr( *henv = '; nextPutAll: (self class henv referentAddress printStringRadix: 16); nextPutAll: ', SQL_ATTR_CP_MATCH'; nextPutAll: ', SQL_CP_RELAXED_MATCH'; nextPutAll: ', SQL_IS_INTEGER'; nextPutAll: ' )'. self class trace: self emitTrace]. rc == xif SQL_SUCCESS ifFalse: [^self class unableToSetEnvironmentAttributeSignal raise].
setCPToStrictMatch "Set Connection Pooling to Strict Match." | xif rc | xif := self class xif. rc := xif SQLSetEnvAttr: self class henv with: xif SQL_ATTR_CP_MATCH with: xif SQL_CP_STRICT_MATCH with: xif SQL_IS_INTEGER. traceLevel >= 3 ifTrue: [(self traceStream) print: rc; nextPutAll: ' = SQLSetEnvAttr( *henv = '; nextPutAll: (self class henv referentAddress printStringRadix: 16); nextPutAll: ', SQL_ATTR_CP_MATCH'; nextPutAll: ', SQL_CP_STRICT_MATCH'; nextPutAll: ', SQL_IS_INTEGER'; nextPutAll: ' )'. self class trace: self emitTrace]. rc == xif SQL_SUCCESS ifFalse: [^self class unableToSetEnvironmentAttributeSignal raise].
unprotectedAddHenvReference "Acquire an environment handle if needed and record a reference. Senders must ensure protection using HenvLock. If this method completes normally, resources are held that should be released explicitly using #unprotectedDropHenvReference." | xif phenv rc | xif := self class xif. "Not too much to do if environment handle already allocated." Henv notNil ifTrue: ["One more reference to the Henv." HenvReferencesCount := HenvReferencesCount + 1. ^self]. "Get the environment handle." [ ["Begin unwind protection" self class connectionPooling ifTrue: [ self setConnectionPoolingOn. ]. phenv := xif HENV perform: xif mallocSelector with: 1. rc := xif SQLAllocEnv: phenv. traceLevel >= 3 ifTrue: [(self traceStream) print: rc; nextPutAll: ' = SQLAllocEnv(), *phenv = '; nextPutAll: (phenv contents referentAddress printStringRadix: 16). self class trace: self emitTrace]. rc == xif SQL_SUCCESS ifFalse: [^self class unableToAllocateHandleSignal raise]. "Save environment handle" Henv := phenv contents. self class connectionPooling ifTrue: [ self class cpStrictMatch ifTrue: [ self setCPToStrictMatch. ] ifFalse: [ self setCPToRelaxedMatch. ]. ]. HenvReferencesCount := 1. "End unwind protection."] ensure: [phenv notNil ifTrue: [phenv freePointer]]] on: Object errorSignal do: [:ex | self class externalDatabaseLibraryInaccessibleSignal raise]
unprotectedAllocConnect "Acquire reference to environment handle and then allocate a connection handle. Senders must ensure protection using HenvLock. If this method completes normally, resources are held that should be released explicitly using #unprotectedFreeConnect." | xif phdbc rc | xif := self class xif. "Make sure we have a reference to the environment handle." self unprotectedAddHenvReference. [ "Begin unwind protection (level 1) -- ensure release of environment handle on failure." [ "Begin unwind protection (level 2) -- ensure release of pointers on success or failure." phdbc := xif HDBC perform: xif mallocSelector with: 1. rc := xif SQLAllocConnect: self class henv with: phdbc. (traceLevel >= 3) ifTrue: [(self traceStream) print: rc; nextPutAll: ' = SQLAllocConnect( henv = '; nextPutAll: (self class henv referentAddress printStringRadix: 16 ); nextPutAll: ', *phdbc = '; nextPutAll: (phdbc contents referentAddress printStringRadix: 16); nextPutAll: ')'. self class trace: self emitTrace]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getEnvironmentErrors. ^self class unableToAllocateHandleSignal raiseWith: errs errorString: errs first dbmsErrorString]. self hdbc: phdbc contents. "End unwind protection (level 2)" ] ensure: [ phdbc notNil ifTrue: [ phdbc freePointer ] ]. "End unwind protection (level 1)" ] ifCurtailed: [ "Some failure is causing unwind, don't keep the environment handle reference." self unprotectedDropHenvReference ]
unprotectedDropHenvReference "Remove a reference to the environment handle. If no references left, release the handle. Senders must ensure protection using HenvLock." | xif rc | xif := self class xif. "Reduce the reference count." (HenvReferencesCount := HenvReferencesCount - 1) > 0 ifTrue: [ "Little to do if other references still remain." ^self ]. [ "Begin unwind protection." rc := xif SQLFreeEnv: Henv. (traceLevel >= 3) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLFreeEnv( henv = '; nextPutAll: (Henv referentAddress printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getEnvironmentErrors. ^self class unableToFreeResourceSignal raiseRequestWith: errs errorString: errs first dbmsErrorString ]. "End connection pooling if it is active." self class connectionsArePooled ifTrue: [ self setConnectionPoolingOff ]. "End unwind protection." ] ensure: [ Henv := nil ]
unprotectedFreeConnect "Free the connection handle and then release reference to environment handle. Senders must ensure protection using HenvLock." | xif rc | xif := self class xif. [ "Begin unwind protection" rc := xif SQLFreeConnect: self hdbc. (traceLevel >= 3) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLFreeConnect( hdbc = '; nextPutAll: (self hdbc referentAddress printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS ) ifFalse: [ | errs | errs := self getEnvironmentErrors. ^self class unableToFreeResourceSignal raiseRequestWith: errs errorString: errs first dbmsErrorString ]. "End unwind protection." ] ensure: [ "Whether or not there was a failure, there's no point in hanging onto these." self hdbc: nil. self unprotectedDropHenvReference ]
</methods> <methods> Database.ODBCConnection class <category>accessing</category>
bufferClass "Answer the buffer class for sessions" ^ODBCBuffer
columnDescriptionClass "Answer the class to use for column description objects associated with receiver." ^ODBCColumnDescription
connectionPooling ^ConnectionPooling
connectionPooling: aBoolean ConnectionPooling := aBoolean
connectionsArePooled ^ConnectionsArePooled
connectionsArePooled: aBoolean "This is a private method, called when pooling gets activated or deactivated." ^ConnectionsArePooled := aBoolean
cpStrictMatch ^CpStrictMatch
cpStrictMatch: aBoolean CpStrictMatch := aBoolean
dataSourceClass "Answer the error class for the receiver." ^ODBCDataSource
defaultError "Answer a default error instance for the receiver." | err | err := self errorClass new. err dbmsErrorCode: 0. err dbmsErrorString: 'Connection Error'. err sqlState: String new. ^err
errorClass "Answer the error class for the receiver." ^ODBCError
henv ^Henv
interfaceClass "Answer the correct interface class" | interfaceClassName | xifMap isNil ifTrue: [self initializeInterfaceMapping]. interfaceClassName := xifMap at: self platformType ifAbsent: [nil]. ^interfaceClassName notNil ifTrue: [ self environment at: interfaceClassName ifAbsent: [nil] ] ifFalse: [nil]
kind "Answer a symbol representing the type of DMBS the receiver provides services for." ^#'ODBC 3.0 (Generic)'
sessionClass "Answer the class to use for session objects associated with receiver." ^ODBCSession
transactionClass "Answer the class to use for transaction objects associated with receiver." ^ODBCTransaction
version ^'Database Connect for ODBC - Release 3.5'
xif "Answer the ExternalInterface subclass instance to use." xif isNil ifTrue: [ self initializeExternalInterface ]. ^xif
</methods> <methods> Database.ODBCConnection class <category>class initialization</category>
initialize "ODBCConnection initialize" Henv := nil. HenvLock := RecursionLock new. HenvReferencesCount := 0. self initializeInterfaceMapping. self xif: nil. self initRegistry. self connectionPooling: false. self cpStrictMatch: true. self connectionsArePooled: false. SupportedIsolationLevels := IdentityDictionary new. SupportedIsolationLevels at: #RR put: #SQL_TXN_REPEATABLE_READ. SupportedIsolationLevels at: #RC put: #SQL_TXN_READ_COMMITTED. SupportedIsolationLevels at: #RU put: #SQL_TXN_READ_UNCOMMITED. SupportedIsolationLevels at: #serializable put: #SQL_TXN_SERIALIZABLE. SupportedIsolationLevels at: #versioning put: #SQL_TXN_VERSIONING. self sessionClass initialize.
initializeExternalInterface "Reset xif call with the right interface class based on the current platform." | xifClass | xifClass := self interfaceClass. self xif: (xifClass notNil ifTrue: [xifClass new] ifFalse: [nil]). xif isNil ifTrue: [^Dialog warn: 'The ODBC CLI Driver is not correctly installed.' withCRs]. self initializeInformationTypeConversionMap.
initializeInformationTypeConversionMap "ODBCConnection initializeInformationTypeConversionMap" (SQLInfoTypeConversionMap := IdentityDictionary new) add: #SQL_ACTIVE_CONNECTIONS->#stringAt:; add: #SQL_ACTIVE_STATEMENTS->#shortAt:; add: #SQL_DATA_SOURCE_NAME->#stringAt:; add: #SQL_DRIVER_HDBC->#longAt:; add: #SQL_DRIVER_HENV->#longAt:; add: #SQL_DRIVER_HSTMT->#longAt:; add: #SQL_DRIVER_NAME->#stringAt:; add: #SQL_DRIVER_VER->#stringAt:; add: #SQL_FETCH_DIRECTION->#longAt:; add: #SQL_ODBC_API_CONFORMANCE->#shortAt:; add: #SQL_ODBC_VER->#stringAt:; add: #SQL_ROW_UPDATES->#stringAt:; add: #SQL_ODBC_SAG_CLI_CONFORMANCE->#shortAt:; add: #SQL_SERVER_NAME->#stringAt:; add: #SQL_SEARCH_PATTERN_ESCAPE->#stringAt:; add: #SQL_ODBC_SQL_CONFORMANCE->#shortAt:; add: #SQL_DATABASE_NAME->#stringAt:; add: #SQL_DBMS_NAME->#stringAt:; add: #SQL_DBMS_VER->#stringAt:; add: #SQL_ACCESSIBLE_TABLES->#stringAt:; add: #SQL_ACCESSIBLE_PROCEDURES->#stringAt:; add: #SQL_PROCEDURES->#stringAt:; add: #SQL_CONCAT_NULL_BEHAVIOR->#shortAt:; add: #SQL_CURSOR_COMMIT_BEHAVIOR->#shortAt:; add: #SQL_CURSOR_ROLLBACK_BEHAVIOR->#shortAt:; add: #SQL_DATA_SOURCE_READ_ONLY->#stringAt:; add: #SQL_DEFAULT_TXN_ISOLATION->#longAt:; add: #SQL_EXPRESSIONS_IN_ORDERBY->#stringAt:; add: #SQL_IDENTIFIER_CASE->#shortAt:; add: #SQL_IDENTIFIER_QUOTE_CHAR->#stringAt:; add: #SQL_MAX_COLUMN_NAME_LEN->#shortAt:; add: #SQL_MAX_CURSOR_NAME_LEN->#shortAt:; add: #SQL_MAX_OWNER_NAME_LEN->#shortAt:; add: #SQL_MAX_PROCEDURE_NAME_LEN->#shortAt:; add: #SQL_MAX_QUALIFIER_NAME_LEN->#shortAt:; add: #SQL_MAX_TABLE_NAME_LEN->#shortAt:; add: #SQL_MULT_RESULT_SETS->#stringAt:; add: #SQL_MULTIPLE_ACTIVE_TXN->#stringAt:; add: #SQL_OUTER_JOINS->#stringAt:; add: #SQL_OWNER_TERM->#stringAt:; add: #SQL_PROCEDURE_TERM->#stringAt:; add: #SQL_QUALIFIER_NAME_SEPARATOR->#stringAt:; add: #SQL_QUALIFIER_TERM->#stringAt:; add: #SQL_SCROLL_CONCURRENCY->#longAt:; add: #SQL_SCROLL_OPTIONS->#longAt:; add: #SQL_TABLE_TERM->#stringAt:; add: #SQL_TXN_CAPABLE->#shortAt:; add: #SQL_USER_NAME->#stringAt:; add: #SQL_CONVERT_FUNCTIONS->#longAt:; add: #SQL_NUMERIC_FUNCTIONS->#longAt:; add: #SQL_STRING_FUNCTIONS->#longAt:; add: #SQL_SYSTEM_FUNCTIONS->#longAt:; add: #SQL_TIMEDATE_FUNCTIONS->#longAt:; add: #SQL_TXN_ISOLATION_OPTION->#longAt:; add: #SQL_ODBC_SQL_OPT_IEF->#stringAt:; add: #SQL_GETDATA_EXTENSIONS->#longAt:.
initializeInterfaceMapping xifMap := IdentityDictionary new. xifMap at: #nt put: #ODBCCLINTInterface. xifMap at: #win95 put: #ODBCCLINTInterface. xifMap at: #unknown put: #ODBCCLIInterface
</methods> <methods> Database.ODBCConnection class <category>activation</category>
pause ^self quiesce
resume ^self activate
</methods> <methods> Database.ODBCConnection class <category>private-registry</category>
registry ^RegisteredODBCConnections
registry: aCollection RegisteredODBCConnections := aCollection
</methods> <methods> Database.ODBCConnection class <category>private-activation</category>
install "This method can be inherrited, and will simply pass the install directive down the chain for those subclasses that need it." self subclasses do: [:each | each install]. "Execute initialization code just once, here." self == ODBCConnection ifTrue: [TraceLevel >= 1 ifTrue: [self trace: nil]. Henv := nil. HenvReferencesCount := 0. self xif: nil. self sessionClass install. self returnFromSnapshot]
</methods> <methods> Database.ODBCTransaction <category>private-finalization</category>
acquireExternal ^self
beginExternal ^self
commitExternal ^self
dismissExternal ^self
rollbackExternal ^self
</methods> <methods> Database.ODBCTransaction <category>private-execution</category>
executor ^self shouldNotImplement
finalizeExternal ^self shouldNotImplement
key ^self shouldNotImplement
</methods> <methods> Database.ODBCTransaction class <category>accessing</category>
connectionClass "Answer the class to use for connection objects associated with receiver." ^ODBCConnection
</methods> <methods> Database.ODBCTransaction class <category>private-registry</category>
registry: aCollection ^self shouldNotImplement
</methods> <methods> Database.ODBCError <category>accessing</category>
sqlState ^sqlState
sqlState: anInteger sqlState := anInteger
</methods> <methods> Database.ODBCCLIInterface <category>types</category>
BOOKMARK <C: typedef unsigned long BOOKMARK>
DATE_STRUCT <C: typedef struct tagDATE_STRUCT DATE_STRUCT>
HDBC <C: typedef void * HDBC>
HENV <C: typedef void * HENV>
HSTMT <C: typedef void * HSTMT>
HWND <C: typedef void * HWND>
LDOUBLE <C: typedef double LDOUBLE>
PSDWORD <C: typedef long * PSDWORD>
PSWORD <C: typedef int * PSWORD>
PTR <C: typedef void * PTR>
PUSDWORD <C: typedef unsigned long * PUSDWORD>
PUSWORD <C: typedef unsigned int * PUSWORD>
RETCODE <C: typedef short RETCODE>
SCHAR <C: typedef char SCHAR>
SDOUBLE <C: typedef double SDOUBLE>
SDWORD <C: typedef long SDWORD>
SFLOAT <C: typedef float SFLOAT>
SLONG <C: typedef long SLONG>
SSHORT <C: typedef short SSHORT>
SWORD <C: typedef short SWORD>
TIMESTAMP_STRUCT <C: typedef struct tagTIMESTAMP_STRUCT TIMESTAMP_STRUCT>
TIME_STRUCT <C: typedef struct tagTIME_STRUCT TIME_STRUCT>
UCHAR <C: typedef unsigned char UCHAR>
UDWORD <C: typedef unsigned long UDWORD>
ULONG <C: typedef unsigned long ULONG>
USHORT <C: typedef unsigned short USHORT>
UWORD <C: typedef unsigned short UWORD>
</methods> <methods> Database.ODBCCLIInterface <category>structs</category>
tagDATE_STRUCT <C: struct tagDATE_STRUCT { SWORD year; UWORD month, day; }>
tagTIMESTAMP_STRUCT <C: struct tagTIMESTAMP_STRUCT { SWORD year; UWORD month, day, hour, minute, second; UDWORD fraction; }>
tagTIME_STRUCT <C: struct tagTIME_STRUCT { UWORD hour, minute, second; }>
</methods> <methods> Database.ODBCCLIInterface <category>defines</category>
EXPORT <C: #define EXPORT _export >
FAR <C: #define FAR >
ODBCVER <C: #define ODBCVER 528 >
SQL_ACCESSIBLE_PROCEDURES <C: #define SQL_ACCESSIBLE_PROCEDURES 20 >
SQL_ACCESSIBLE_TABLES <C: #define SQL_ACCESSIBLE_TABLES 19 >
SQL_ACCESS_MODE <C: #define SQL_ACCESS_MODE 101 >
SQL_ACTIVE_CONNECTIONS <C: #define SQL_ACTIVE_CONNECTIONS 0 >
SQL_ACTIVE_STATEMENTS <C: #define SQL_ACTIVE_STATEMENTS 1 >
SQL_ADD <C: #define SQL_ADD 4 >
SQL_ALL_EXCEPT_LIKE <C: #define SQL_ALL_EXCEPT_LIKE 2 >
SQL_ALL_TYPES <C: #define SQL_ALL_TYPES 0 >
SQL_ALTER_TABLE <C: #define SQL_ALTER_TABLE 86 >
SQL_API <C: #define SQL_API >
SQL_API_ALL_FUNCTIONS <C: #define SQL_API_ALL_FUNCTIONS 0 >
SQL_API_LOADBYORDINAL <C: #define SQL_API_LOADBYORDINAL 199 >
SQL_API_SQLALLOCCONNECT <C: #define SQL_API_SQLALLOCCONNECT 1 >
SQL_API_SQLALLOCENV <C: #define SQL_API_SQLALLOCENV 2 >
SQL_API_SQLALLOCSTMT <C: #define SQL_API_SQLALLOCSTMT 3 >
SQL_API_SQLBINDCOL <C: #define SQL_API_SQLBINDCOL 4 >
SQL_API_SQLBINDPARAMETER <C: #define SQL_API_SQLBINDPARAMETER 72 >
SQL_API_SQLBROWSECONNECT <C: #define SQL_API_SQLBROWSECONNECT 55 >
SQL_API_SQLCANCEL <C: #define SQL_API_SQLCANCEL 5 >
SQL_API_SQLCOLATTRIBUTES <C: #define SQL_API_SQLCOLATTRIBUTES 6 >
SQL_API_SQLCOLUMNPRIVILEGES <C: #define SQL_API_SQLCOLUMNPRIVILEGES 56 >
SQL_API_SQLCOLUMNS <C: #define SQL_API_SQLCOLUMNS 40 >
SQL_API_SQLCONNECT <C: #define SQL_API_SQLCONNECT 7 >
SQL_API_SQLDATASOURCES <C: #define SQL_API_SQLDATASOURCES 57 >
SQL_API_SQLDESCRIBECOL <C: #define SQL_API_SQLDESCRIBECOL 8 >
SQL_API_SQLDESCRIBEPARAM <C: #define SQL_API_SQLDESCRIBEPARAM 58 >
SQL_API_SQLDISCONNECT <C: #define SQL_API_SQLDISCONNECT 9 >
SQL_API_SQLDRIVERCONNECT <C: #define SQL_API_SQLDRIVERCONNECT 41 >
SQL_API_SQLDRIVERS <C: #define SQL_API_SQLDRIVERS 71 >
SQL_API_SQLERROR <C: #define SQL_API_SQLERROR 10 >
SQL_API_SQLEXECDIRECT <C: #define SQL_API_SQLEXECDIRECT 11 >
SQL_API_SQLEXECUTE <C: #define SQL_API_SQLEXECUTE 12 >
SQL_API_SQLEXTENDEDFETCH <C: #define SQL_API_SQLEXTENDEDFETCH 59 >
SQL_API_SQLFETCH <C: #define SQL_API_SQLFETCH 13 >
SQL_API_SQLFOREIGNKEYS <C: #define SQL_API_SQLFOREIGNKEYS 60 >
SQL_API_SQLFREECONNECT <C: #define SQL_API_SQLFREECONNECT 14 >
SQL_API_SQLFREEENV <C: #define SQL_API_SQLFREEENV 15 >
SQL_API_SQLFREESTMT <C: #define SQL_API_SQLFREESTMT 16 >
SQL_API_SQLGETCONNECTOPTION <C: #define SQL_API_SQLGETCONNECTOPTION 42 >
SQL_API_SQLGETCURSORNAME <C: #define SQL_API_SQLGETCURSORNAME 17 >
SQL_API_SQLGETDATA <C: #define SQL_API_SQLGETDATA 43 >
SQL_API_SQLGETFUNCTIONS <C: #define SQL_API_SQLGETFUNCTIONS 44 >
SQL_API_SQLGETINFO <C: #define SQL_API_SQLGETINFO 45 >
SQL_API_SQLGETSTMTOPTION <C: #define SQL_API_SQLGETSTMTOPTION 46 >
SQL_API_SQLGETTYPEINFO <C: #define SQL_API_SQLGETTYPEINFO 47 >
SQL_API_SQLMORERESULTS <C: #define SQL_API_SQLMORERESULTS 61 >
SQL_API_SQLNATIVESQL <C: #define SQL_API_SQLNATIVESQL 62 >
SQL_API_SQLNUMPARAMS <C: #define SQL_API_SQLNUMPARAMS 63 >
SQL_API_SQLNUMRESULTCOLS <C: #define SQL_API_SQLNUMRESULTCOLS 18 >
SQL_API_SQLPARAMDATA <C: #define SQL_API_SQLPARAMDATA 48 >
SQL_API_SQLPARAMOPTIONS <C: #define SQL_API_SQLPARAMOPTIONS 64 >
SQL_API_SQLPREPARE <C: #define SQL_API_SQLPREPARE 19 >
SQL_API_SQLPRIMARYKEYS <C: #define SQL_API_SQLPRIMARYKEYS 65 >
SQL_API_SQLPROCEDURECOLUMNS <C: #define SQL_API_SQLPROCEDURECOLUMNS 66 >
SQL_API_SQLPROCEDURES <C: #define SQL_API_SQLPROCEDURES 67 >
SQL_API_SQLPUTDATA <C: #define SQL_API_SQLPUTDATA 49 >
SQL_API_SQLROWCOUNT <C: #define SQL_API_SQLROWCOUNT 20 >
SQL_API_SQLSETCONNECTOPTION <C: #define SQL_API_SQLSETCONNECTOPTION 50 >
SQL_API_SQLSETCURSORNAME <C: #define SQL_API_SQLSETCURSORNAME 21 >
SQL_API_SQLSETPARAM <C: #define SQL_API_SQLSETPARAM 22 >
SQL_API_SQLSETPOS <C: #define SQL_API_SQLSETPOS 68 >
SQL_API_SQLSETSCROLLOPTIONS <C: #define SQL_API_SQLSETSCROLLOPTIONS 69 >
SQL_API_SQLSETSTMTOPTION <C: #define SQL_API_SQLSETSTMTOPTION 51 >
SQL_API_SQLSPECIALCOLUMNS <C: #define SQL_API_SQLSPECIALCOLUMNS 52 >
SQL_API_SQLSTATISTICS <C: #define SQL_API_SQLSTATISTICS 53 >
SQL_API_SQLTABLEPRIVILEGES <C: #define SQL_API_SQLTABLEPRIVILEGES 70 >
SQL_API_SQLTABLES <C: #define SQL_API_SQLTABLES 54 >
SQL_API_SQLTRANSACT <C: #define SQL_API_SQLTRANSACT 23 >
SQL_ASYNC_ENABLE <C: #define SQL_ASYNC_ENABLE 4 >
SQL_ASYNC_ENABLE_DEFAULT <C: #define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF >
SQL_ASYNC_ENABLE_OFF <C: #define SQL_ASYNC_ENABLE_OFF 0L >
SQL_ASYNC_ENABLE_ON <C: #define SQL_ASYNC_ENABLE_ON 1L >
SQL_ATTR_CONNECTION_POOLING <C: #define SQL_ATTR_CONNECTION_POOLING 201 >
SQL_ATTR_CP_MATCH <C: #define SQL_ATTR_CP_MATCH 202 >
SQL_ATTR_ODBC_VERSION <C: #define SQL_ATTR_ODBC_VERSION 200 >
SQL_ATTR_READONLY <C: #define SQL_ATTR_READONLY 0 >
SQL_ATTR_READWRITE_UNKNOWN <C: #define SQL_ATTR_READWRITE_UNKNOWN 2 >
SQL_ATTR_WRITE <C: #define SQL_ATTR_WRITE 1 >
SQL_AT_ADD_COLUMN <C: #define SQL_AT_ADD_COLUMN 0x00000001 >
SQL_AT_DROP_COLUMN <C: #define SQL_AT_DROP_COLUMN 0x00000002 >
SQL_AUTOCOMMIT <C: #define SQL_AUTOCOMMIT 102 >
SQL_AUTOCOMMIT_DEFAULT <C: #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON >
SQL_AUTOCOMMIT_OFF <C: #define SQL_AUTOCOMMIT_OFF 0L >
SQL_AUTOCOMMIT_ON <C: #define SQL_AUTOCOMMIT_ON 1L >
SQL_BEST_ROWID <C: #define SQL_BEST_ROWID 1 >
SQL_BIGINT <C: #define SQL_BIGINT (-5) >
SQL_BINARY <C: #define SQL_BINARY (-2) >
SQL_BIND_BY_COLUMN <C: #define SQL_BIND_BY_COLUMN 0L >
SQL_BIND_TYPE <C: #define SQL_BIND_TYPE 5 >
SQL_BIND_TYPE_DEFAULT <C: #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN >
SQL_BIT <C: #define SQL_BIT (-7) >
SQL_BLOB <C: #define SQL_BLOB -98 >
SQL_BOOKMARK_PERSISTENCE <C: #define SQL_BOOKMARK_PERSISTENCE 82 >
SQL_BP_CLOSE <C: #define SQL_BP_CLOSE 0x00000001 >
SQL_BP_DELETE <C: #define SQL_BP_DELETE 0x00000002 >
SQL_BP_DROP <C: #define SQL_BP_DROP 0x00000004 >
SQL_BP_OTHER_HSTMT <C: #define SQL_BP_OTHER_HSTMT 0x00000020 >
SQL_BP_SCROLL <C: #define SQL_BP_SCROLL 0x00000040 >
SQL_BP_TRANSACTION <C: #define SQL_BP_TRANSACTION 0x00000008 >
SQL_BP_UPDATE <C: #define SQL_BP_UPDATE 0x00000010 >
SQL_CASCADE <C: #define SQL_CASCADE 0 >
SQL_CB_CLOSE <C: #define SQL_CB_CLOSE 0x0001 >
SQL_CB_DELETE <C: #define SQL_CB_DELETE 0x0000 >
SQL_CB_NON_NULL <C: #define SQL_CB_NON_NULL 0x0001 >
SQL_CB_NULL <C: #define SQL_CB_NULL 0x0000 >
SQL_CB_PRESERVE <C: #define SQL_CB_PRESERVE 0x0002 >
SQL_CC_CLOSE <C: #define SQL_CC_CLOSE SQL_CB_CLOSE >
SQL_CC_DELETE <C: #define SQL_CC_DELETE SQL_CB_DELETE >
SQL_CC_PRESERVE <C: #define SQL_CC_PRESERVE SQL_CB_PRESERVE >
SQL_CHAR <C: #define SQL_CHAR 1 >
SQL_CLOB <C: #define SQL_CLOB -99 >
SQL_CLOSE <C: #define SQL_CLOSE 0 >
SQL_CN_ANY <C: #define SQL_CN_ANY 0x0002 >
SQL_CN_DIFFERENT <C: #define SQL_CN_DIFFERENT 0x0001 >
SQL_CN_NONE <C: #define SQL_CN_NONE 0x0000 >
SQL_COLATT_OPT_MAX <C: #define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL >
SQL_COLATT_OPT_MIN <C: #define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT >
SQL_COLUMN_ALIAS <C: #define SQL_COLUMN_ALIAS 87 >
SQL_COLUMN_AUTO_INCREMENT <C: #define SQL_COLUMN_AUTO_INCREMENT 11 >
SQL_COLUMN_CASE_SENSITIVE <C: #define SQL_COLUMN_CASE_SENSITIVE 12 >
SQL_COLUMN_COUNT <C: #define SQL_COLUMN_COUNT 0 >
SQL_COLUMN_DISPLAY_SIZE <C: #define SQL_COLUMN_DISPLAY_SIZE 6 >
SQL_COLUMN_DRIVER_START <C: #define SQL_COLUMN_DRIVER_START 1000 >
SQL_COLUMN_LABEL <C: #define SQL_COLUMN_LABEL 18 >
SQL_COLUMN_LENGTH <C: #define SQL_COLUMN_LENGTH 3 >
SQL_COLUMN_MONEY <C: #define SQL_COLUMN_MONEY 9 >
SQL_COLUMN_NAME <C: #define SQL_COLUMN_NAME 1 >
SQL_COLUMN_NULLABLE <C: #define SQL_COLUMN_NULLABLE 7 >
SQL_COLUMN_OWNER_NAME <C: #define SQL_COLUMN_OWNER_NAME 16 >
SQL_COLUMN_PRECISION <C: #define SQL_COLUMN_PRECISION 4 >
SQL_COLUMN_QUALIFIER_NAME <C: #define SQL_COLUMN_QUALIFIER_NAME 17 >
SQL_COLUMN_SCALE <C: #define SQL_COLUMN_SCALE 5 >
SQL_COLUMN_SEARCHABLE <C: #define SQL_COLUMN_SEARCHABLE 13 >
SQL_COLUMN_TABLE_NAME <C: #define SQL_COLUMN_TABLE_NAME 15 >
SQL_COLUMN_TYPE <C: #define SQL_COLUMN_TYPE 2 >
SQL_COLUMN_TYPE_NAME <C: #define SQL_COLUMN_TYPE_NAME 14 >
SQL_COLUMN_UNSIGNED <C: #define SQL_COLUMN_UNSIGNED 8 >
SQL_COLUMN_UPDATABLE <C: #define SQL_COLUMN_UPDATABLE 10 >
SQL_COMMIT <C: #define SQL_COMMIT 0 >
SQL_CONCAT_NULL_BEHAVIOR <C: #define SQL_CONCAT_NULL_BEHAVIOR 22 >
SQL_CONCURRENCY <C: #define SQL_CONCURRENCY 7 >
SQL_CONCUR_DEFAULT <C: #define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY >
SQL_CONCUR_LOCK <C: #define SQL_CONCUR_LOCK 2 >
SQL_CONCUR_READ_ONLY <C: #define SQL_CONCUR_READ_ONLY 1 >
SQL_CONCUR_ROWVER <C: #define SQL_CONCUR_ROWVER 3 >
SQL_CONCUR_TIMESTAMP <C: #define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER >
SQL_CONCUR_VALUES <C: #define SQL_CONCUR_VALUES 4 >
SQL_CONNECT_OPT_DRVR_START <C: #define SQL_CONNECT_OPT_DRVR_START 1000 >
SQL_CONN_OPT_MAX <C: #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE >
SQL_CONN_OPT_MIN <C: #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE >
SQL_CONVERT_BIGINT <C: #define SQL_CONVERT_BIGINT 53 >
SQL_CONVERT_BINARY <C: #define SQL_CONVERT_BINARY 54 >
SQL_CONVERT_BIT <C: #define SQL_CONVERT_BIT 55 >
SQL_CONVERT_CHAR <C: #define SQL_CONVERT_CHAR 56 >
SQL_CONVERT_DATE <C: #define SQL_CONVERT_DATE 57 >
SQL_CONVERT_DECIMAL <C: #define SQL_CONVERT_DECIMAL 58 >
SQL_CONVERT_DOUBLE <C: #define SQL_CONVERT_DOUBLE 59 >
SQL_CONVERT_FLOAT <C: #define SQL_CONVERT_FLOAT 60 >
SQL_CONVERT_FUNCTIONS <C: #define SQL_CONVERT_FUNCTIONS 48 >
SQL_CONVERT_INTEGER <C: #define SQL_CONVERT_INTEGER 61 >
SQL_CONVERT_LONGVARBINARY <C: #define SQL_CONVERT_LONGVARBINARY 71 >
SQL_CONVERT_LONGVARCHAR <C: #define SQL_CONVERT_LONGVARCHAR 62 >
SQL_CONVERT_NUMERIC <C: #define SQL_CONVERT_NUMERIC 63 >
SQL_CONVERT_REAL <C: #define SQL_CONVERT_REAL 64 >
SQL_CONVERT_SMALLINT <C: #define SQL_CONVERT_SMALLINT 65 >
SQL_CONVERT_TIME <C: #define SQL_CONVERT_TIME 66 >
SQL_CONVERT_TIMESTAMP <C: #define SQL_CONVERT_TIMESTAMP 67 >
SQL_CONVERT_TINYINT <C: #define SQL_CONVERT_TINYINT 68 >
SQL_CONVERT_VARBINARY <C: #define SQL_CONVERT_VARBINARY 69 >
SQL_CONVERT_VARCHAR <C: #define SQL_CONVERT_VARCHAR 70 >
SQL_CORRELATION_NAME <C: #define SQL_CORRELATION_NAME 74 >
SQL_CP_DEFAULT <C: #define SQL_CP_DEFAULT SQL_CP_OFF >
SQL_CP_MATCH_DEFAULT <C: #define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH >
SQL_CP_OFF <C: #define SQL_CP_OFF 0UL >
SQL_CP_ONE_PER_DRIVER <C: #define SQL_CP_ONE_PER_DRIVER 1UL >
SQL_CP_ONE_PER_HENV <C: #define SQL_CP_ONE_PER_HENV 2UL >
SQL_CP_RELAXED_MATCH <C: #define SQL_CP_RELAXED_MATCH 1UL >
SQL_CP_STRICT_MATCH <C: #define SQL_CP_STRICT_MATCH 0UL >
SQL_CR_CLOSE <C: #define SQL_CR_CLOSE SQL_CB_CLOSE >
SQL_CR_DELETE <C: #define SQL_CR_DELETE SQL_CB_DELETE >
SQL_CR_PRESERVE <C: #define SQL_CR_PRESERVE SQL_CB_PRESERVE >
SQL_CURRENT_QUALIFIER <C: #define SQL_CURRENT_QUALIFIER 109 >
SQL_CURSOR_COMMIT_BEHAVIOR <C: #define SQL_CURSOR_COMMIT_BEHAVIOR 23 >
SQL_CURSOR_DYNAMIC <C: #define SQL_CURSOR_DYNAMIC 2L >
SQL_CURSOR_FORWARD_ONLY <C: #define SQL_CURSOR_FORWARD_ONLY 0L >
SQL_CURSOR_KEYSET_DRIVEN <C: #define SQL_CURSOR_KEYSET_DRIVEN 1L >
SQL_CURSOR_ROLLBACK_BEHAVIOR <C: #define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 >
SQL_CURSOR_STATIC <C: #define SQL_CURSOR_STATIC 3L >
SQL_CURSOR_TYPE <C: #define SQL_CURSOR_TYPE 6 >
SQL_CURSOR_TYPE_DEFAULT <C: #define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY >
SQL_CUR_DEFAULT <C: #define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER >
SQL_CUR_USE_DRIVER <C: #define SQL_CUR_USE_DRIVER 2L >
SQL_CUR_USE_IF_NEEDED <C: #define SQL_CUR_USE_IF_NEEDED 0L >
SQL_CUR_USE_ODBC <C: #define SQL_CUR_USE_ODBC 1L >
SQL_CVT_BIGINT <C: #define SQL_CVT_BIGINT 0x00004000 >
SQL_CVT_BINARY <C: #define SQL_CVT_BINARY 0x00000400 >
SQL_CVT_BIT <C: #define SQL_CVT_BIT 0x00001000 >
SQL_CVT_CHAR <C: #define SQL_CVT_CHAR 0x00000001 >
SQL_CVT_DATE <C: #define SQL_CVT_DATE 0x00008000 >
SQL_CVT_DECIMAL <C: #define SQL_CVT_DECIMAL 0x00000004 >
SQL_CVT_DOUBLE <C: #define SQL_CVT_DOUBLE 0x00000080 >
SQL_CVT_FLOAT <C: #define SQL_CVT_FLOAT 0x00000020 >
SQL_CVT_INTEGER <C: #define SQL_CVT_INTEGER 0x00000008 >
SQL_CVT_LONGVARBINARY <C: #define SQL_CVT_LONGVARBINARY 0x00040000 >
SQL_CVT_LONGVARCHAR <C: #define SQL_CVT_LONGVARCHAR 0x00000200 >
SQL_CVT_NUMERIC <C: #define SQL_CVT_NUMERIC 0x00000002 >
SQL_CVT_REAL <C: #define SQL_CVT_REAL 0x00000040 >
SQL_CVT_SMALLINT <C: #define SQL_CVT_SMALLINT 0x00000010 >
SQL_CVT_TIME <C: #define SQL_CVT_TIME 0x00010000 >
SQL_CVT_TIMESTAMP <C: #define SQL_CVT_TIMESTAMP 0x00020000 >
SQL_CVT_TINYINT <C: #define SQL_CVT_TINYINT 0x00002000 >
SQL_CVT_VARBINARY <C: #define SQL_CVT_VARBINARY 0x00000800 >
SQL_CVT_VARCHAR <C: #define SQL_CVT_VARCHAR 0x00000100 >
SQL_C_BINARY <C: #define SQL_C_BINARY SQL_BINARY >
SQL_C_BIT <C: #define SQL_C_BIT SQL_BIT >
SQL_C_BOOKMARK <C: #define SQL_C_BOOKMARK SQL_C_ULONG >
SQL_C_CHAR <C: #define SQL_C_CHAR SQL_CHAR >
SQL_C_DATE <C: #define SQL_C_DATE SQL_DATE >
SQL_C_DEFAULT <C: #define SQL_C_DEFAULT 99 >
SQL_C_DOUBLE <C: #define SQL_C_DOUBLE SQL_DOUBLE >
SQL_C_FLOAT <C: #define SQL_C_FLOAT SQL_REAL >
SQL_C_GUID <C: #define SQL_C_GUID SQL_GUID >
SQL_C_LONG <C: #define SQL_C_LONG SQL_INTEGER >
SQL_C_SHORT <C: #define SQL_C_SHORT SQL_SMALLINT >
SQL_C_SLONG <C: #define SQL_C_SLONG SQL_C_LONG+SQL_SIGNED_OFFSET >
SQL_C_SSHORT <C: #define SQL_C_SSHORT SQL_C_SHORT+SQL_SIGNED_OFFSET >
SQL_C_STINYINT <C: #define SQL_C_STINYINT SQL_TINYINT+SQL_SIGNED_OFFSET >
SQL_C_TIME <C: #define SQL_C_TIME SQL_TIME >
SQL_C_TIMESTAMP <C: #define SQL_C_TIMESTAMP SQL_TIMESTAMP >
SQL_C_TINYINT <C: #define SQL_C_TINYINT SQL_TINYINT >
SQL_C_ULONG <C: #define SQL_C_ULONG SQL_C_LONG+SQL_UNSIGNED_OFFSET >
SQL_C_USHORT <C: #define SQL_C_USHORT SQL_C_SHORT+SQL_UNSIGNED_OFFSET >
SQL_C_UTINYINT <C: #define SQL_C_UTINYINT SQL_TINYINT+SQL_UNSIGNED_OFFSET >
SQL_C_WCHAR <C: #define SQL_C_WCHAR SQL_WCHAR >
SQL_DATABASE_NAME <C: #define SQL_DATABASE_NAME 16 >
SQL_DATA_AT_EXEC <C: #define SQL_DATA_AT_EXEC (-2) >
SQL_DATA_SOURCE_NAME <C: #define SQL_DATA_SOURCE_NAME 2 >
SQL_DATA_SOURCE_READ_ONLY <C: #define SQL_DATA_SOURCE_READ_ONLY 25 >
SQL_DATE <C: #define SQL_DATE 9 >
SQL_DBMS_NAME <C: #define SQL_DBMS_NAME 17 >
SQL_DBMS_VER <C: #define SQL_DBMS_VER 18 >
SQL_DECIMAL <C: #define SQL_DECIMAL 3 >
SQL_DEFAULT_PARAM <C: #define SQL_DEFAULT_PARAM (-5) >
SQL_DEFAULT_TXN_ISOLATION <C: #define SQL_DEFAULT_TXN_ISOLATION 26 >
SQL_DELETE <C: #define SQL_DELETE 3 >
SQL_DOUBLE <C: #define SQL_DOUBLE 8 >
SQL_DRIVER_COMPLETE <C: #define SQL_DRIVER_COMPLETE 1 >
SQL_DRIVER_COMPLETE_REQUIRED <C: #define SQL_DRIVER_COMPLETE_REQUIRED 3 >
SQL_DRIVER_HDBC <C: #define SQL_DRIVER_HDBC 3 >
SQL_DRIVER_HENV <C: #define SQL_DRIVER_HENV 4 >
SQL_DRIVER_HLIB <C: #define SQL_DRIVER_HLIB 76 >
SQL_DRIVER_HSTMT <C: #define SQL_DRIVER_HSTMT 5 >
SQL_DRIVER_NAME <C: #define SQL_DRIVER_NAME 6 >
SQL_DRIVER_NOPROMPT <C: #define SQL_DRIVER_NOPROMPT 0 >
SQL_DRIVER_ODBC_VER <C: #define SQL_DRIVER_ODBC_VER 77 >
SQL_DRIVER_PROMPT <C: #define SQL_DRIVER_PROMPT 2 >
SQL_DRIVER_VER <C: #define SQL_DRIVER_VER 7 >
SQL_DROP <C: #define SQL_DROP 1 >
SQL_ENSURE <C: #define SQL_ENSURE 1 >
SQL_ENTIRE_ROWSET <C: #define SQL_ENTIRE_ROWSET 0 >
SQL_ERROR <C: #define SQL_ERROR (-1) >
SQL_EXPRESSIONS_IN_ORDERBY <C: #define SQL_EXPRESSIONS_IN_ORDERBY 27 >
SQL_EXT_API_LAST <C: #define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER >
SQL_EXT_API_START <C: #define SQL_EXT_API_START 40 >
SQL_FD_FETCH_ABSOLUTE <C: #define SQL_FD_FETCH_ABSOLUTE 0x00000010 >
SQL_FD_FETCH_BOOKMARK <C: #define SQL_FD_FETCH_BOOKMARK 0x00000080 >
SQL_FD_FETCH_FIRST <C: #define SQL_FD_FETCH_FIRST 0x00000002 >
SQL_FD_FETCH_LAST <C: #define SQL_FD_FETCH_LAST 0x00000004 >
SQL_FD_FETCH_NEXT <C: #define SQL_FD_FETCH_NEXT 0x00000001 >
SQL_FD_FETCH_PREV <C: #define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR >
SQL_FD_FETCH_PRIOR <C: #define SQL_FD_FETCH_PRIOR 0x00000008 >
SQL_FD_FETCH_RELATIVE <C: #define SQL_FD_FETCH_RELATIVE 0x00000020 >
SQL_FD_FETCH_RESUME <C: #define SQL_FD_FETCH_RESUME 0x00000040 >
SQL_FETCH_ABSOLUTE <C: #define SQL_FETCH_ABSOLUTE 5 >
SQL_FETCH_BOOKMARK <C: #define SQL_FETCH_BOOKMARK 8 >
SQL_FETCH_DIRECTION <C: #define SQL_FETCH_DIRECTION 8 >
SQL_FETCH_FIRST <C: #define SQL_FETCH_FIRST 2 >
SQL_FETCH_LAST <C: #define SQL_FETCH_LAST 3 >
SQL_FETCH_NEXT <C: #define SQL_FETCH_NEXT 1 >
SQL_FETCH_PREV <C: #define SQL_FETCH_PREV SQL_FETCH_PRIOR >
SQL_FETCH_PRIOR <C: #define SQL_FETCH_PRIOR 4 >
SQL_FETCH_RELATIVE <C: #define SQL_FETCH_RELATIVE 6 >
SQL_FETCH_RESUME <C: #define SQL_FETCH_RESUME 7 >
SQL_FILE_NOT_SUPPORTED <C: #define SQL_FILE_NOT_SUPPORTED 0x0000 >
SQL_FILE_QUALIFIER <C: #define SQL_FILE_QUALIFIER 0x0002 >
SQL_FILE_TABLE <C: #define SQL_FILE_TABLE 0x0001 >
SQL_FILE_USAGE <C: #define SQL_FILE_USAGE 84 >
SQL_FLOAT <C: #define SQL_FLOAT 6 >
SQL_FN_CVT_CONVERT <C: #define SQL_FN_CVT_CONVERT 0x00000001 >
SQL_FN_NUM_ABS <C: #define SQL_FN_NUM_ABS 0x00000001 >
SQL_FN_NUM_ACOS <C: #define SQL_FN_NUM_ACOS 0x00000002 >
SQL_FN_NUM_ASIN <C: #define SQL_FN_NUM_ASIN 0x00000004 >
SQL_FN_NUM_ATAN <C: #define SQL_FN_NUM_ATAN 0x00000008 >
SQL_FN_NUM_ATAN2 <C: #define SQL_FN_NUM_ATAN2 0x00000010 >
SQL_FN_NUM_CEILING <C: #define SQL_FN_NUM_CEILING 0x00000020 >
SQL_FN_NUM_COS <C: #define SQL_FN_NUM_COS 0x00000040 >
SQL_FN_NUM_COT <C: #define SQL_FN_NUM_COT 0x00000080 >
SQL_FN_NUM_DEGREES <C: #define SQL_FN_NUM_DEGREES 0x00040000 >
SQL_FN_NUM_EXP <C: #define SQL_FN_NUM_EXP 0x00000100 >
SQL_FN_NUM_FLOOR <C: #define SQL_FN_NUM_FLOOR 0x00000200 >
SQL_FN_NUM_LOG <C: #define SQL_FN_NUM_LOG 0x00000400 >
SQL_FN_NUM_LOG10 <C: #define SQL_FN_NUM_LOG10 0x00080000 >
SQL_FN_NUM_MOD <C: #define SQL_FN_NUM_MOD 0x00000800 >
SQL_FN_NUM_PI <C: #define SQL_FN_NUM_PI 0x00010000 >
SQL_FN_NUM_POWER <C: #define SQL_FN_NUM_POWER 0x00100000 >
SQL_FN_NUM_RADIANS <C: #define SQL_FN_NUM_RADIANS 0x00200000 >
SQL_FN_NUM_RAND <C: #define SQL_FN_NUM_RAND 0x00020000 >
SQL_FN_NUM_ROUND <C: #define SQL_FN_NUM_ROUND 0x00400000 >
SQL_FN_NUM_SIGN <C: #define SQL_FN_NUM_SIGN 0x00001000 >
SQL_FN_NUM_SIN <C: #define SQL_FN_NUM_SIN 0x00002000 >
SQL_FN_NUM_SQRT <C: #define SQL_FN_NUM_SQRT 0x00004000 >
SQL_FN_NUM_TAN <C: #define SQL_FN_NUM_TAN 0x00008000 >
SQL_FN_NUM_TRUNCATE <C: #define SQL_FN_NUM_TRUNCATE 0x00800000 >
SQL_FN_STR_ASCII <C: #define SQL_FN_STR_ASCII 0x00002000 >
SQL_FN_STR_CHAR <C: #define SQL_FN_STR_CHAR 0x00004000 >
SQL_FN_STR_CONCAT <C: #define SQL_FN_STR_CONCAT 0x00000001 >
SQL_FN_STR_DIFFERENCE <C: #define SQL_FN_STR_DIFFERENCE 0x00008000 >
SQL_FN_STR_INSERT <C: #define SQL_FN_STR_INSERT 0x00000002 >
SQL_FN_STR_LCASE <C: #define SQL_FN_STR_LCASE 0x00000040 >
SQL_FN_STR_LEFT <C: #define SQL_FN_STR_LEFT 0x00000004 >
SQL_FN_STR_LENGTH <C: #define SQL_FN_STR_LENGTH 0x00000010 >
SQL_FN_STR_LOCATE <C: #define SQL_FN_STR_LOCATE 0x00000020 >
SQL_FN_STR_LOCATE_2 <C: #define SQL_FN_STR_LOCATE_2 0x00010000 >
SQL_FN_STR_LTRIM <C: #define SQL_FN_STR_LTRIM 0x00000008 >
SQL_FN_STR_REPEAT <C: #define SQL_FN_STR_REPEAT 0x00000080 >
SQL_FN_STR_REPLACE <C: #define SQL_FN_STR_REPLACE 0x00000100 >
SQL_FN_STR_RIGHT <C: #define SQL_FN_STR_RIGHT 0x00000200 >
SQL_FN_STR_RTRIM <C: #define SQL_FN_STR_RTRIM 0x00000400 >
SQL_FN_STR_SOUNDEX <C: #define SQL_FN_STR_SOUNDEX 0x00020000 >
SQL_FN_STR_SPACE <C: #define SQL_FN_STR_SPACE 0x00040000 >
SQL_FN_STR_SUBSTRING <C: #define SQL_FN_STR_SUBSTRING 0x00000800 >
SQL_FN_STR_UCASE <C: #define SQL_FN_STR_UCASE 0x00001000 >
SQL_FN_SYS_DBNAME <C: #define SQL_FN_SYS_DBNAME 0x00000002 >
SQL_FN_SYS_IFNULL <C: #define SQL_FN_SYS_IFNULL 0x00000004 >
SQL_FN_SYS_USERNAME <C: #define SQL_FN_SYS_USERNAME 0x00000001 >
SQL_FN_TD_CURDATE <C: #define SQL_FN_TD_CURDATE 0x00000002 >
SQL_FN_TD_CURTIME <C: #define SQL_FN_TD_CURTIME 0x00000200 >
SQL_FN_TD_DAYNAME <C: #define SQL_FN_TD_DAYNAME 0x00008000 >
SQL_FN_TD_DAYOFMONTH <C: #define SQL_FN_TD_DAYOFMONTH 0x00000004 >
SQL_FN_TD_DAYOFWEEK <C: #define SQL_FN_TD_DAYOFWEEK 0x00000008 >
SQL_FN_TD_DAYOFYEAR <C: #define SQL_FN_TD_DAYOFYEAR 0x00000010 >
SQL_FN_TD_HOUR <C: #define SQL_FN_TD_HOUR 0x00000400 >
SQL_FN_TD_MINUTE <C: #define SQL_FN_TD_MINUTE 0x00000800 >
SQL_FN_TD_MONTH <C: #define SQL_FN_TD_MONTH 0x00000020 >
SQL_FN_TD_MONTHNAME <C: #define SQL_FN_TD_MONTHNAME 0x00010000 >
SQL_FN_TD_NOW <C: #define SQL_FN_TD_NOW 0x00000001 >
SQL_FN_TD_QUARTER <C: #define SQL_FN_TD_QUARTER 0x00000040 >
SQL_FN_TD_SECOND <C: #define SQL_FN_TD_SECOND 0x00001000 >
SQL_FN_TD_TIMESTAMPADD <C: #define SQL_FN_TD_TIMESTAMPADD 0x00002000 >
SQL_FN_TD_TIMESTAMPDIFF <C: #define SQL_FN_TD_TIMESTAMPDIFF 0x00004000 >
SQL_FN_TD_WEEK <C: #define SQL_FN_TD_WEEK 0x00000080 >
SQL_FN_TD_YEAR <C: #define SQL_FN_TD_YEAR 0x00000100 >
SQL_FN_TSI_DAY <C: #define SQL_FN_TSI_DAY 0x00000010 >
SQL_FN_TSI_FRAC_SECOND <C: #define SQL_FN_TSI_FRAC_SECOND 0x00000001 >
SQL_FN_TSI_HOUR <C: #define SQL_FN_TSI_HOUR 0x00000008 >
SQL_FN_TSI_MINUTE <C: #define SQL_FN_TSI_MINUTE 0x00000004 >
SQL_FN_TSI_MONTH <C: #define SQL_FN_TSI_MONTH 0x00000040 >
SQL_FN_TSI_QUARTER <C: #define SQL_FN_TSI_QUARTER 0x00000080 >
SQL_FN_TSI_SECOND <C: #define SQL_FN_TSI_SECOND 0x00000002 >
SQL_FN_TSI_WEEK <C: #define SQL_FN_TSI_WEEK 0x00000020 >
SQL_FN_TSI_YEAR <C: #define SQL_FN_TSI_YEAR 0x00000100 >
SQL_GB_GROUP_BY_CONTAINS_SELECT <C: #define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002 >
SQL_GB_GROUP_BY_EQUALS_SELECT <C: #define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 >
SQL_GB_NOT_SUPPORTED <C: #define SQL_GB_NOT_SUPPORTED 0x0000 >
SQL_GB_NO_RELATION <C: #define SQL_GB_NO_RELATION 0x0003 >
SQL_GD_ANY_COLUMN <C: #define SQL_GD_ANY_COLUMN 0x00000001 >
SQL_GD_ANY_ORDER <C: #define SQL_GD_ANY_ORDER 0x00000002 >
SQL_GD_BLOCK <C: #define SQL_GD_BLOCK 0x00000004 >
SQL_GD_BOUND <C: #define SQL_GD_BOUND 0x00000008 >
SQL_GETDATA_EXTENSIONS <C: #define SQL_GETDATA_EXTENSIONS 81 >
SQL_GET_BOOKMARK <C: #define SQL_GET_BOOKMARK 13 >
SQL_GROUP_BY <C: #define SQL_GROUP_BY 88 >
SQL_GUID <C: #define SQL_GUID -11 >
SQL_IC_LOWER <C: #define SQL_IC_LOWER 0x0002 >
SQL_IC_MIXED <C: #define SQL_IC_MIXED 0x0004 >
SQL_IC_SENSITIVE <C: #define SQL_IC_SENSITIVE 0x0003 >
SQL_IC_UPPER <C: #define SQL_IC_UPPER 0x0001 >
SQL_IDENTIFIER_CASE <C: #define SQL_IDENTIFIER_CASE 28 >
SQL_IDENTIFIER_QUOTE_CHAR <C: #define SQL_IDENTIFIER_QUOTE_CHAR 29 >
SQL_IGNORE <C: #define SQL_IGNORE (-6) >
SQL_INDEX_ALL <C: #define SQL_INDEX_ALL 1 >
SQL_INDEX_CLUSTERED <C: #define SQL_INDEX_CLUSTERED 1 >
SQL_INDEX_HASHED <C: #define SQL_INDEX_HASHED 2 >
SQL_INDEX_OTHER <C: #define SQL_INDEX_OTHER 3 >
SQL_INDEX_UNIQUE <C: #define SQL_INDEX_UNIQUE 0 >
SQL_INFO_DRIVER_START <C: #define SQL_INFO_DRIVER_START 1000 >
SQL_INFO_FIRST <C: #define SQL_INFO_FIRST 0 >
SQL_INFO_LAST <C: #define SQL_INFO_LAST SQL_QUALIFIER_LOCATION >
SQL_INTEGER <C: #define SQL_INTEGER 4 >
SQL_INTERVAL_DAY <C: #define SQL_INTERVAL_DAY (-83) >
SQL_INTERVAL_DAY_TO_HOUR <C: #define SQL_INTERVAL_DAY_TO_HOUR (-87) >
SQL_INTERVAL_DAY_TO_MINUTE <C: #define SQL_INTERVAL_DAY_TO_MINUTE (-88) >
SQL_INTERVAL_DAY_TO_SECOND <C: #define SQL_INTERVAL_DAY_TO_SECOND (-89) >
SQL_INTERVAL_HOUR <C: #define SQL_INTERVAL_HOUR (-84) >
SQL_INTERVAL_HOUR_TO_MINUTE <C: #define SQL_INTERVAL_HOUR_TO_MINUTE (-90) >
SQL_INTERVAL_HOUR_TO_SECOND <C: #define SQL_INTERVAL_HOUR_TO_SECOND (-91) >
SQL_INTERVAL_MINUTE <C: #define SQL_INTERVAL_MINUTE (-85) >
SQL_INTERVAL_MINUTE_TO_SECOND <C: #define SQL_INTERVAL_MINUTE_TO_SECOND (-92) >
SQL_INTERVAL_MONTH <C: #define SQL_INTERVAL_MONTH (-81) >
SQL_INTERVAL_SECOND <C: #define SQL_INTERVAL_SECOND (-86) >
SQL_INTERVAL_YEAR <C: #define SQL_INTERVAL_YEAR (-80) >
SQL_INTERVAL_YEAR_TO_MONTH <C: #define SQL_INTERVAL_YEAR_TO_MONTH (-82) >
SQL_INVALID_HANDLE <C: #define SQL_INVALID_HANDLE (-2) >
SQL_IS_INTEGER <C: #define SQL_IS_INTEGER (-6) >
SQL_IS_POINTER <C: #define SQL_IS_POINTER (-4) >
SQL_IS_UINTEGER <C: #define SQL_IS_UINTEGER (-5) >
SQL_KEYSET_SIZE <C: #define SQL_KEYSET_SIZE 8 >
SQL_KEYSET_SIZE_DEFAULT <C: #define SQL_KEYSET_SIZE_DEFAULT 0L >
SQL_KEYWORDS <C: #define SQL_KEYWORDS 89 >
SQL_LCK_EXCLUSIVE <C: #define SQL_LCK_EXCLUSIVE 0x00000002 >
SQL_LCK_NO_CHANGE <C: #define SQL_LCK_NO_CHANGE 0x00000001 >
SQL_LCK_UNLOCK <C: #define SQL_LCK_UNLOCK 0x00000004 >
SQL_LEN_DATA_AT_EXEC_OFFSET <C: #define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) >
SQL_LIKE_ESCAPE_CLAUSE <C: #define SQL_LIKE_ESCAPE_CLAUSE 113 >
SQL_LIKE_ONLY <C: #define SQL_LIKE_ONLY 1 >
SQL_LOCK_EXCLUSIVE <C: #define SQL_LOCK_EXCLUSIVE 1 >
SQL_LOCK_NO_CHANGE <C: #define SQL_LOCK_NO_CHANGE 0 >
SQL_LOCK_TYPES <C: #define SQL_LOCK_TYPES 78 >
SQL_LOCK_UNLOCK <C: #define SQL_LOCK_UNLOCK 2 >
SQL_LOGIN_TIMEOUT <C: #define SQL_LOGIN_TIMEOUT 103 >
SQL_LOGIN_TIMEOUT_DEFAULT <C: #define SQL_LOGIN_TIMEOUT_DEFAULT 15L >
SQL_LONGVARBINARY <C: #define SQL_LONGVARBINARY (-4) >
SQL_LONGVARCHAR <C: #define SQL_LONGVARCHAR (-1) >
SQL_MAX_BINARY_LITERAL_LEN <C: #define SQL_MAX_BINARY_LITERAL_LEN 112 >
SQL_MAX_CHAR_LITERAL_LEN <C: #define SQL_MAX_CHAR_LITERAL_LEN 108 >
SQL_MAX_COLUMNS_IN_GROUP_BY <C: #define SQL_MAX_COLUMNS_IN_GROUP_BY 97 >
SQL_MAX_COLUMNS_IN_INDEX <C: #define SQL_MAX_COLUMNS_IN_INDEX 98 >
SQL_MAX_COLUMNS_IN_ORDER_BY <C: #define SQL_MAX_COLUMNS_IN_ORDER_BY 99 >
SQL_MAX_COLUMNS_IN_SELECT <C: #define SQL_MAX_COLUMNS_IN_SELECT 100 >
SQL_MAX_COLUMNS_IN_TABLE <C: #define SQL_MAX_COLUMNS_IN_TABLE 101 >
SQL_MAX_COLUMN_NAME_LEN <C: #define SQL_MAX_COLUMN_NAME_LEN 30 >
SQL_MAX_CURSOR_NAME_LEN <C: #define SQL_MAX_CURSOR_NAME_LEN 31 >
SQL_MAX_DSN_LENGTH <C: #define SQL_MAX_DSN_LENGTH 32 >
SQL_MAX_INDEX_SIZE <C: #define SQL_MAX_INDEX_SIZE 102 >
SQL_MAX_LENGTH <C: #define SQL_MAX_LENGTH 3 >
SQL_MAX_LENGTH_DEFAULT <C: #define SQL_MAX_LENGTH_DEFAULT 0L >
SQL_MAX_MESSAGE_LENGTH <C: #define SQL_MAX_MESSAGE_LENGTH 512 >
SQL_MAX_OPTION_STRING_LENGTH <C: #define SQL_MAX_OPTION_STRING_LENGTH 256 >
SQL_MAX_OWNER_NAME_LEN <C: #define SQL_MAX_OWNER_NAME_LEN 32 >
SQL_MAX_PROCEDURE_NAME_LEN <C: #define SQL_MAX_PROCEDURE_NAME_LEN 33 >
SQL_MAX_QUALIFIER_NAME_LEN <C: #define SQL_MAX_QUALIFIER_NAME_LEN 34 >
SQL_MAX_ROWS <C: #define SQL_MAX_ROWS 1 >
SQL_MAX_ROWS_DEFAULT <C: #define SQL_MAX_ROWS_DEFAULT 0L >
SQL_MAX_ROW_SIZE <C: #define SQL_MAX_ROW_SIZE 104 >
SQL_MAX_ROW_SIZE_INCLUDES_LONG <C: #define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103 >
SQL_MAX_STATEMENT_LEN <C: #define SQL_MAX_STATEMENT_LEN 105 >
SQL_MAX_TABLES_IN_SELECT <C: #define SQL_MAX_TABLES_IN_SELECT 106 >
SQL_MAX_TABLE_NAME_LEN <C: #define SQL_MAX_TABLE_NAME_LEN 35 >
SQL_MAX_USER_NAME_LEN <C: #define SQL_MAX_USER_NAME_LEN 107 >
SQL_MODE_DEFAULT <C: #define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE >
SQL_MODE_READ_ONLY <C: #define SQL_MODE_READ_ONLY 1L >
SQL_MODE_READ_WRITE <C: #define SQL_MODE_READ_WRITE 0L >
SQL_MULTIPLE_ACTIVE_TXN <C: #define SQL_MULTIPLE_ACTIVE_TXN 37 >
SQL_MULT_RESULT_SETS <C: #define SQL_MULT_RESULT_SETS 36 >
SQL_NC_END <C: #define SQL_NC_END 0x0004 >
SQL_NC_HIGH <C: #define SQL_NC_HIGH 0x0000 >
SQL_NC_LOW <C: #define SQL_NC_LOW 0x0001 >
SQL_NC_START <C: #define SQL_NC_START 0x0002 >
SQL_NEED_DATA <C: #define SQL_NEED_DATA 99 >
SQL_NEED_LONG_DATA_LEN <C: #define SQL_NEED_LONG_DATA_LEN 111 >
SQL_NNC_NON_NULL <C: #define SQL_NNC_NON_NULL 0x0001 >
SQL_NNC_NULL <C: #define SQL_NNC_NULL 0x0000 >
SQL_NON_NULLABLE_COLUMNS <C: #define SQL_NON_NULLABLE_COLUMNS 75 >
SQL_NOSCAN <C: #define SQL_NOSCAN 2 >
SQL_NOSCAN_DEFAULT <C: #define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF >
SQL_NOSCAN_OFF <C: #define SQL_NOSCAN_OFF 0L >
SQL_NOSCAN_ON <C: #define SQL_NOSCAN_ON 1L >
SQL_NO_DATA_FOUND <C: #define SQL_NO_DATA_FOUND 100 >
SQL_NO_NULLS <C: #define SQL_NO_NULLS 0 >
SQL_NO_TOTAL <C: #define SQL_NO_TOTAL (-4) >
SQL_NTS <C: #define SQL_NTS (-3) >
SQL_NULLABLE <C: #define SQL_NULLABLE 1 >
SQL_NULLABLE_UNKNOWN <C: #define SQL_NULLABLE_UNKNOWN 2 >
SQL_NULL_COLLATION <C: #define SQL_NULL_COLLATION 85 >
SQL_NULL_DATA <C: #define SQL_NULL_DATA (-1) >
SQL_NULL_HDBC <C: #define SQL_NULL_HDBC 0 >
SQL_NULL_HENV <C: #define SQL_NULL_HENV 0 >
SQL_NULL_HSTMT <C: #define SQL_NULL_HSTMT 0 >
SQL_NUMERIC <C: #define SQL_NUMERIC 2 >
SQL_NUMERIC_FUNCTIONS <C: #define SQL_NUMERIC_FUNCTIONS 49 >
SQL_NUM_EXTENSIONS <C: #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1) >
SQL_NUM_FUNCTIONS <C: #define SQL_NUM_FUNCTIONS 23 >
SQL_OAC_LEVEL1 <C: #define SQL_OAC_LEVEL1 0x0001 >
SQL_OAC_LEVEL2 <C: #define SQL_OAC_LEVEL2 0x0002 >
SQL_OAC_NONE <C: #define SQL_OAC_NONE 0x0000 >
SQL_ODBC_API_CONFORMANCE <C: #define SQL_ODBC_API_CONFORMANCE 9 >
SQL_ODBC_CURSORS <C: #define SQL_ODBC_CURSORS 110 >
SQL_ODBC_SAG_CLI_CONFORMANCE <C: #define SQL_ODBC_SAG_CLI_CONFORMANCE 12 >
SQL_ODBC_SQL_CONFORMANCE <C: #define SQL_ODBC_SQL_CONFORMANCE 15 >
SQL_ODBC_SQL_OPT_IEF <C: #define SQL_ODBC_SQL_OPT_IEF 73 >
SQL_ODBC_VER <C: #define SQL_ODBC_VER 10 >
SQL_OJ_ALL_COMPARISON_OPS <C: #define SQL_OJ_ALL_COMPARISON_OPS 0x00000040 >
SQL_OJ_CAPABILITIES <C: #define SQL_OJ_CAPABILITIES 65003 >
SQL_OJ_FULL <C: #define SQL_OJ_FULL 0x00000004 >
SQL_OJ_INNER <C: #define SQL_OJ_INNER 0x00000020 >
SQL_OJ_LEFT <C: #define SQL_OJ_LEFT 0x00000001 >
SQL_OJ_NESTED <C: #define SQL_OJ_NESTED 0x00000008 >
SQL_OJ_NOT_ORDERED <C: #define SQL_OJ_NOT_ORDERED 0x00000010 >
SQL_OJ_RIGHT <C: #define SQL_OJ_RIGHT 0x00000002 >
SQL_OPT_TRACE <C: #define SQL_OPT_TRACE 104 >
SQL_OPT_TRACEFILE <C: #define SQL_OPT_TRACEFILE 105 >
SQL_OPT_TRACE_DEFAULT <C: #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF >
SQL_OPT_TRACE_FILE_DEFAULT <C: #define SQL_OPT_TRACE_FILE_DEFAULT "SQL.LOG" >
SQL_OPT_TRACE_OFF <C: #define SQL_OPT_TRACE_OFF 0L >
SQL_OPT_TRACE_ON <C: #define SQL_OPT_TRACE_ON 1L >
SQL_ORDER_BY_COLUMNS_IN_SELECT <C: #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90 >
SQL_OSCC_COMPLIANT <C: #define SQL_OSCC_COMPLIANT 0x0001 >
SQL_OSCC_NOT_COMPLIANT <C: #define SQL_OSCC_NOT_COMPLIANT 0x0000 >
SQL_OSC_CORE <C: #define SQL_OSC_CORE 0x0001 >
SQL_OSC_EXTENDED <C: #define SQL_OSC_EXTENDED 0x0002 >
SQL_OSC_MINIMUM <C: #define SQL_OSC_MINIMUM 0x0000 >
SQL_OUTER_JOINS <C: #define SQL_OUTER_JOINS 38 >
SQL_OU_DML_STATEMENTS <C: #define SQL_OU_DML_STATEMENTS 0x00000001 >
SQL_OU_INDEX_DEFINITION <C: #define SQL_OU_INDEX_DEFINITION 0x00000008 >
SQL_OU_PRIVILEGE_DEFINITION <C: #define SQL_OU_PRIVILEGE_DEFINITION 0x00000010 >
SQL_OU_PROCEDURE_INVOCATION <C: #define SQL_OU_PROCEDURE_INVOCATION 0x00000002 >
SQL_OU_TABLE_DEFINITION <C: #define SQL_OU_TABLE_DEFINITION 0x00000004 >
SQL_OV_ODBC2 <C: #define SQL_OV_ODBC2 2UL >
SQL_OV_ODBC3 <C: #define SQL_OV_ODBC3 3UL >
SQL_OWNER_TERM <C: #define SQL_OWNER_TERM 39 >
SQL_OWNER_USAGE <C: #define SQL_OWNER_USAGE 91 >
SQL_PACKET_SIZE <C: #define SQL_PACKET_SIZE 112 >
SQL_PARAM_INPUT <C: #define SQL_PARAM_INPUT 1 >
SQL_PARAM_INPUT_OUTPUT <C: #define SQL_PARAM_INPUT_OUTPUT 2 >
SQL_PARAM_OUTPUT <C: #define SQL_PARAM_OUTPUT 4 >
SQL_PARAM_TYPE_DEFAULT <C: #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT >
SQL_PARAM_TYPE_UNKNOWN <C: #define SQL_PARAM_TYPE_UNKNOWN 0 >
SQL_PC_NON_PSEUDO <C: #define SQL_PC_NON_PSEUDO SQL_PC_NOT_PSEUDO >
SQL_PC_NOT_PSEUDO <C: #define SQL_PC_NOT_PSEUDO 1 >
SQL_PC_PSEUDO <C: #define SQL_PC_PSEUDO 2 >
SQL_PC_UNKNOWN <C: #define SQL_PC_UNKNOWN 0 >
SQL_POSITION <C: #define SQL_POSITION 0 >
SQL_POSITIONED_STATEMENTS <C: #define SQL_POSITIONED_STATEMENTS 80 >
SQL_POS_ADD <C: #define SQL_POS_ADD 0x00000010 >
SQL_POS_DELETE <C: #define SQL_POS_DELETE 0x00000008 >
SQL_POS_OPERATIONS <C: #define SQL_POS_OPERATIONS 79 >
SQL_POS_POSITION <C: #define SQL_POS_POSITION 0x00000001 >
SQL_POS_REFRESH <C: #define SQL_POS_REFRESH 0x00000002 >
SQL_POS_UPDATE <C: #define SQL_POS_UPDATE 0x00000004 >
SQL_PROCEDURES <C: #define SQL_PROCEDURES 21 >
SQL_PROCEDURE_TERM <C: #define SQL_PROCEDURE_TERM 40 >
SQL_PS_POSITIONED_DELETE <C: #define SQL_PS_POSITIONED_DELETE 0x00000001 >
SQL_PS_POSITIONED_UPDATE <C: #define SQL_PS_POSITIONED_UPDATE 0x00000002 >
SQL_PS_SELECT_FOR_UPDATE <C: #define SQL_PS_SELECT_FOR_UPDATE 0x00000004 >
SQL_PT_FUNCTION <C: #define SQL_PT_FUNCTION 2 >
SQL_PT_PROCEDURE <C: #define SQL_PT_PROCEDURE 1 >
SQL_PT_UNKNOWN <C: #define SQL_PT_UNKNOWN 0 >
SQL_QL_END <C: #define SQL_QL_END 0x0002 >
SQL_QL_START <C: #define SQL_QL_START 0x0001 >
SQL_QUALIFIER_LOCATION <C: #define SQL_QUALIFIER_LOCATION 114 >
SQL_QUALIFIER_NAME_SEPARATOR <C: #define SQL_QUALIFIER_NAME_SEPARATOR 41 >
SQL_QUALIFIER_TERM <C: #define SQL_QUALIFIER_TERM 42 >
SQL_QUALIFIER_USAGE <C: #define SQL_QUALIFIER_USAGE 92 >
SQL_QUERY_TIMEOUT <C: #define SQL_QUERY_TIMEOUT 0 >
SQL_QUERY_TIMEOUT_DEFAULT <C: #define SQL_QUERY_TIMEOUT_DEFAULT 0L >
SQL_QUICK <C: #define SQL_QUICK 0 >
SQL_QUIET_MODE <C: #define SQL_QUIET_MODE 111 >
SQL_QUOTED_IDENTIFIER_CASE <C: #define SQL_QUOTED_IDENTIFIER_CASE 93 >
SQL_QU_DML_STATEMENTS <C: #define SQL_QU_DML_STATEMENTS 0x00000001 >
SQL_QU_INDEX_DEFINITION <C: #define SQL_QU_INDEX_DEFINITION 0x00000008 >
SQL_QU_PRIVILEGE_DEFINITION <C: #define SQL_QU_PRIVILEGE_DEFINITION 0x00000010 >
SQL_QU_PROCEDURE_INVOCATION <C: #define SQL_QU_PROCEDURE_INVOCATION 0x00000002 >
SQL_QU_TABLE_DEFINITION <C: #define SQL_QU_TABLE_DEFINITION 0x00000004 >
SQL_RD_DEFAULT <C: #define SQL_RD_DEFAULT SQL_RD_ON >
SQL_RD_OFF <C: #define SQL_RD_OFF 0L >
SQL_RD_ON <C: #define SQL_RD_ON 1L >
SQL_REAL <C: #define SQL_REAL 7 >
SQL_REFRESH <C: #define SQL_REFRESH 1 >
SQL_RESET_PARAMS <C: #define SQL_RESET_PARAMS 3 >
SQL_RESTRICT <C: #define SQL_RESTRICT 1 >
SQL_RESULT_COL <C: #define SQL_RESULT_COL 3 >
SQL_RETRIEVE_DATA <C: #define SQL_RETRIEVE_DATA 11 >
SQL_RETURN_VALUE <C: #define SQL_RETURN_VALUE 5 >
SQL_ROLLBACK <C: #define SQL_ROLLBACK 1 >
SQL_ROWSET_SIZE <C: #define SQL_ROWSET_SIZE 9 >
SQL_ROWSET_SIZE_DEFAULT <C: #define SQL_ROWSET_SIZE_DEFAULT 1L >
SQL_ROWVER <C: #define SQL_ROWVER 2 >
SQL_ROW_ADDED <C: #define SQL_ROW_ADDED 4 >
SQL_ROW_DELETED <C: #define SQL_ROW_DELETED 1 >
SQL_ROW_ERROR <C: #define SQL_ROW_ERROR 5 >
SQL_ROW_NOROW <C: #define SQL_ROW_NOROW 3 >
SQL_ROW_NUMBER <C: #define SQL_ROW_NUMBER 14 >
SQL_ROW_SUCCESS <C: #define SQL_ROW_SUCCESS 0 >
SQL_ROW_UPDATED <C: #define SQL_ROW_UPDATED 2 >
SQL_ROW_UPDATES <C: #define SQL_ROW_UPDATES 11 >
SQL_SCCO_LOCK <C: #define SQL_SCCO_LOCK 0x00000002 >
SQL_SCCO_OPT_ROWVER <C: #define SQL_SCCO_OPT_ROWVER 0x00000004 >
SQL_SCCO_OPT_TIMESTAMP <C: #define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER >
SQL_SCCO_OPT_VALUES <C: #define SQL_SCCO_OPT_VALUES 0x00000008 >
SQL_SCCO_READ_ONLY <C: #define SQL_SCCO_READ_ONLY 0x00000001 >
SQL_SCOPE_CURROW <C: #define SQL_SCOPE_CURROW 0 >
SQL_SCOPE_SESSION <C: #define SQL_SCOPE_SESSION 2 >
SQL_SCOPE_TRANSACTION <C: #define SQL_SCOPE_TRANSACTION 1 >
SQL_SCROLL_CONCURRENCY <C: #define SQL_SCROLL_CONCURRENCY 43 >
SQL_SCROLL_DYNAMIC <C: #define SQL_SCROLL_DYNAMIC (-2) >
SQL_SCROLL_FORWARD_ONLY <C: #define SQL_SCROLL_FORWARD_ONLY 0 >
SQL_SCROLL_KEYSET_DRIVEN <C: #define SQL_SCROLL_KEYSET_DRIVEN (-1) >
SQL_SCROLL_OPTIONS <C: #define SQL_SCROLL_OPTIONS 44 >
SQL_SCROLL_STATIC <C: #define SQL_SCROLL_STATIC (-3) >
SQL_SC_NON_UNIQUE <C: #define SQL_SC_NON_UNIQUE 0L >
SQL_SC_TRY_UNIQUE <C: #define SQL_SC_TRY_UNIQUE 1L >
SQL_SC_UNIQUE <C: #define SQL_SC_UNIQUE 2L >
SQL_SEARCHABLE <C: #define SQL_SEARCHABLE 3 >
SQL_SEARCH_PATTERN_ESCAPE <C: #define SQL_SEARCH_PATTERN_ESCAPE 14 >
SQL_SERVER_NAME <C: #define SQL_SERVER_NAME 13 >
SQL_SETPARAM_VALUE_MAX <C: #define SQL_SETPARAM_VALUE_MAX (-1) >
SQL_SET_NULL <C: #define SQL_SET_NULL 2 >
SQL_SIGNED_OFFSET <C: #define SQL_SIGNED_OFFSET (-20) >
SQL_SIMULATE_CURSOR <C: #define SQL_SIMULATE_CURSOR 10 >
SQL_SMALLINT <C: #define SQL_SMALLINT 5 >
SQL_SO_DYNAMIC <C: #define SQL_SO_DYNAMIC 0x00000004 >
SQL_SO_FORWARD_ONLY <C: #define SQL_SO_FORWARD_ONLY 0x00000001 >
SQL_SO_KEYSET_DRIVEN <C: #define SQL_SO_KEYSET_DRIVEN 0x00000002 >
SQL_SO_MIXED <C: #define SQL_SO_MIXED 0x00000008 >
SQL_SO_STATIC <C: #define SQL_SO_STATIC 0x00000010 >
SQL_SPECIAL_CHARACTERS <C: #define SQL_SPECIAL_CHARACTERS 94 >
SQL_SPEC_MAJOR <C: #define SQL_SPEC_MAJOR 2 >
SQL_SPEC_MINOR <C: #define SQL_SPEC_MINOR 10 >
SQL_SPEC_STRING <C: #define SQL_SPEC_STRING "02.10" >
SQL_SQLSTATE_SIZE <C: #define SQL_SQLSTATE_SIZE 5 >
SQL_SQ_COMPARISON <C: #define SQL_SQ_COMPARISON 0x00000001 >
SQL_SQ_CORRELATED_SUBQUERIES <C: #define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010 >
SQL_SQ_EXISTS <C: #define SQL_SQ_EXISTS 0x00000002 >
SQL_SQ_IN <C: #define SQL_SQ_IN 0x00000004 >
SQL_SQ_QUANTIFIED <C: #define SQL_SQ_QUANTIFIED 0x00000008 >
SQL_SS_ADDITIONS <C: #define SQL_SS_ADDITIONS 0x00000001 >
SQL_SS_DELETIONS <C: #define SQL_SS_DELETIONS 0x00000002 >
SQL_SS_UPDATES <C: #define SQL_SS_UPDATES 0x00000004 >
SQL_STATIC_SENSITIVITY <C: #define SQL_STATIC_SENSITIVITY 83 >
SQL_STILL_EXECUTING <C: #define SQL_STILL_EXECUTING 2 >
SQL_STMT_OPT_MAX <C: #define SQL_STMT_OPT_MAX SQL_ROW_NUMBER >
SQL_STMT_OPT_MIN <C: #define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT >
SQL_STRING_FUNCTIONS <C: #define SQL_STRING_FUNCTIONS 50 >
SQL_SUBQUERIES <C: #define SQL_SUBQUERIES 95 >
SQL_SUCCESS <C: #define SQL_SUCCESS 0 >
SQL_SUCCESS_WITH_INFO <C: #define SQL_SUCCESS_WITH_INFO 1 >
SQL_SYSTEM_FUNCTIONS <C: #define SQL_SYSTEM_FUNCTIONS 51 >
SQL_TABLE_STAT <C: #define SQL_TABLE_STAT 0 >
SQL_TABLE_TERM <C: #define SQL_TABLE_TERM 45 >
SQL_TC_ALL <C: #define SQL_TC_ALL 0x0002 >
SQL_TC_DDL_COMMIT <C: #define SQL_TC_DDL_COMMIT 0x0003 >
SQL_TC_DDL_IGNORE <C: #define SQL_TC_DDL_IGNORE 0x0004 >
SQL_TC_DML <C: #define SQL_TC_DML 0x0001 >
SQL_TC_NONE <C: #define SQL_TC_NONE 0x0000 >
SQL_TIME <C: #define SQL_TIME 10 >
SQL_TIMEDATE_ADD_INTERVALS <C: #define SQL_TIMEDATE_ADD_INTERVALS 109 >
SQL_TIMEDATE_DIFF_INTERVALS <C: #define SQL_TIMEDATE_DIFF_INTERVALS 110 >
SQL_TIMEDATE_FUNCTIONS <C: #define SQL_TIMEDATE_FUNCTIONS 52 >
SQL_TIMESTAMP <C: #define SQL_TIMESTAMP 11 >
SQL_TINYINT <C: #define SQL_TINYINT (-6) >
SQL_TRANSLATE_DLL <C: #define SQL_TRANSLATE_DLL 106 >
SQL_TRANSLATE_OPTION <C: #define SQL_TRANSLATE_OPTION 107 >
SQL_TXN_CAPABLE <C: #define SQL_TXN_CAPABLE 46 >
SQL_TXN_ISOLATION <C: #define SQL_TXN_ISOLATION 108 >
SQL_TXN_ISOLATION_OPTION <C: #define SQL_TXN_ISOLATION_OPTION 72 >
SQL_TXN_READ_COMMITTED <C: #define SQL_TXN_READ_COMMITTED 0x00000002 >
SQL_TXN_READ_UNCOMMITTED <C: #define SQL_TXN_READ_UNCOMMITTED 0x00000001 >
SQL_TXN_REPEATABLE_READ <C: #define SQL_TXN_REPEATABLE_READ 0x00000004 >
SQL_TXN_SERIALIZABLE <C: #define SQL_TXN_SERIALIZABLE 0x00000008 >
SQL_TXN_VERSIONING <C: #define SQL_TXN_VERSIONING 0x00000010 >
SQL_TYPE_DRIVER_END <C: #define SQL_TYPE_DRIVER_END SQL_UNICODE >
SQL_TYPE_DRIVER_START <C: #define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR >
SQL_TYPE_MAX <C: #define SQL_TYPE_MAX SQL_VARCHAR >
SQL_TYPE_MIN <C: #define SQL_TYPE_MIN SQL_BIT >
SQL_TYPE_NULL <C: #define SQL_TYPE_NULL 0 >
SQL_UB_DEFAULT <C: #define SQL_UB_DEFAULT SQL_UB_OFF >
SQL_UB_OFF <C: #define SQL_UB_OFF 0L >
SQL_UB_ON <C: #define SQL_UB_ON 1L >
SQL_UNBIND <C: #define SQL_UNBIND 2 >
SQL_UNICODE <C: #define SQL_UNICODE (-95) >
SQL_UNION <C: #define SQL_UNION 96 >
SQL_UNSEARCHABLE <C: #define SQL_UNSEARCHABLE 0 >
SQL_UNSIGNED_OFFSET <C: #define SQL_UNSIGNED_OFFSET (-22) >
SQL_UPDATE <C: #define SQL_UPDATE 2 >
SQL_USER_NAME <C: #define SQL_USER_NAME 47 >
SQL_USE_BOOKMARKS <C: #define SQL_USE_BOOKMARKS 12 >
SQL_U_UNION <C: #define SQL_U_UNION 0x00000001 >
SQL_U_UNION_ALL <C: #define SQL_U_UNION_ALL 0x00000002 >
SQL_VARBINARY <C: #define SQL_VARBINARY (-3) >
SQL_VARCHAR <C: #define SQL_VARCHAR 12 >
SQL_VARIANT <C: #define SQL_VARIANT -150 >
SQL_WCHAR <C: #define SQL_WCHAR -8 >
SQL_WLONGVARCHAR <C: #define SQL_WLONGVARCHAR -10 >
SQL_WVARCHAR <C: #define SQL_WVARCHAR -9 >
__DATE__ <C: #define __DATE__ "April 17, 1996" >
__FILE__ <C: #define __FILE__ >
__LINE__ <C: #define __LINE__ 0 >
__SQL <C: #define __SQL >
__SQLEXT <C: #define __SQLEXT >
__STDC__ <C: #define __STDC__ 1 >
__TIME__ <C: #define __TIME__ "8:51:38 pm" >
</methods> <methods> Database.ODBCCLIInterface <category>accessing</category>
copyToHeapSelector ^#copyToHeap
encoding encoding == nil ifTrue: [encoding := self getEncoding]. ^encoding
getDataChunkSize ^self class getDataChunkSize
getDataTransferSize ^self class getDataChunkSize
getEncoding ^#default
mallocSelector ^#malloc:
setDataChunkSize: anInteger self class setDataChunkSize: anInteger
setDataTransferSize: anInteger self class setDataChunkSize: anInteger
</methods> <methods> Database.ODBCCLIInterface <category>macros</category>
SQL_ADD_RECORD: hstmt with: irow "#define SQL_ADD_RECORD(hstmt, irow) SQLSetPos(hstmt ,irow ,SQL_ADD,SQL_LOCK_NO_CHANGE)" ^self SQLSetPos: hstmt with: irow with: self SQL_ADD with: self SQL_LOCK_NO_CHANGE
SQL_DELETE_RECORD: hstmt with: irow "#define SQL_DELETE_RECORD(hstmt, irow) SQLSetPos(hstmt ,irow ,SQL_DELETE,SQL_LOCK_NO_CHANGE)" ^self SQLSetPos: hstmt with: irow with: self SQL_DELETE with: self SQL_LOCK_NO_CHANGE
SQL_LEN_DATA_AT_EXEC: length "#define SQL_LEN_DATA_AT_EXEC(length) (-length +SQL_LEN_DATA_AT_EXEC_OFFSET)" ^length negated + self SQL_LEN_DATA_AT_EXEC_OFFSET
SQL_LOCK_RECORD: hstmt with: irow with: fLock "#define SQL_LOCK_RECORD(hstmt, irow, fLock) SQLSetPos(hstmt ,irow ,SQL_POSITION,fLock )" ^self SQLSetPos: hstmt with: irow with: self SQL_POSITION with: fLock
SQL_POSITION_TO: hstmt with: irow "#define SQL_POSITION_TO(hstmt, irow) SQLSetPos(hstmt ,irow ,SQL_POSITION,SQL_LOCK_NO_CHANGE)" ^self SQLSetPos: hstmt with: irow with: self SQL_POSITION with: self SQL_LOCK_NO_CHANGE
SQL_REFRESH_RECORD: hstmt with: irow with: fLock "#define SQL_REFRESH_RECORD(hstmt, irow, fLock) SQLSetPos(hstmt ,irow ,SQL_REFRESH,fLock )" ^self SQLSetPos: hstmt with: irow with: self SQL_REFRESH with: fLock
SQL_UPDATE_RECORD: hstmt with: irow "#define SQL_UPDATE_RECORD(hstmt, irow) SQLSetPos(hstmt ,irow ,SQL_UPDATE,SQL_LOCK_NO_CHANGE)" ^self SQLSetPos: hstmt with: irow with: self SQL_UPDATE with: self SQL_LOCK_NO_CHANGE
</methods> <methods> Database.ODBCCLIInterface class <category>fileIn/Out</category>
binaryInitializationMessagesFor: sourceMode "Answer a list of message sends used to initialize the receiver." | list | list := super binaryInitializationMessagesFor: sourceMode. list add: ( MessageSend receiver: self selector: #deferredInitialize). ^list
</methods> <methods> Database.ODBCCLIInterface class <category>class initialization</category>
deferredInitialize "Used to initialize the class after file-in or BOSS-in." ^self "Noop for InformixCLIInterface"
initialize self initializeMaps.
initializeMaps | xif charVPB binVPB | dataChunkSize := 1048576. "Set the default chunk size." xif := self new. "Create the association tables for row buffer and bound parameter encoding... The getSelectorMap needs to have a message name understood by InformixBuffer for each conversion. The putSelectorMap needs to have a message name understood by InformixBuffer for each conversion. The fSqlTypeToConversionMap associates InformixBuffer conversion names with the supported fSqlTypes. Note, several Informix CLI types may map to the same conversion name. The fSqlType and fCType used for each conversion are based on the structure of the value buffer expected by the putSelector method. The fetchBufferSizeBlocks are given the length of the column as answered by SQLDescribeCol and answer the size to allocate to store data for that conversion name. The valueSizeBlocks are given an instance of the data to put in the buffer and answer the number of bytes to allocate. Since large objects are inserted as a series of chunks, the buffer size is equal to the chunk size. The valuePrecisionBlocks are given an instance of the data to put in the buffer and answer the number of elements which may be stored in the buffer. Note that this value is ignored by SQLSetParam unless the fSqlType is one of the CHAR or GRAPHIC types and the block for any ignored case should answer 0 (this will improve the chance of early detection if Informix ceases to ignore them). For the CHAR and GRAPHIC types, the answer is the maximum number of characters (not bytes) to be provided by that parameter." getSelectorMap := IdentityDictionary new. putSelectorMap := IdentityDictionary new. fSqlTypeToConversionMap := IdentityDictionary new. fSqlTypeFromConversionMap := IdentityDictionary new. fCTypeFromConversionMap := IdentityDictionary new. fetchBufferSizeBlocks := IdentityDictionary new. valueSizeBlocks := IdentityDictionary new. valuePrecisionBlocks := IdentityDictionary new. "Conversion to/from buffer for Date." getSelectorMap add: ( #Date -> #getDateAt: ). putSelectorMap add: ( #Date -> #at:putDate: ). fSqlTypeToConversionMap add: ( xif SQL_DATE -> #Date ). fSqlTypeFromConversionMap add: ( #Date -> xif SQL_TIMESTAMP ). fSqlTypeFromConversionMap add: ( #Date -> xif SQL_DATE ). fCTypeFromConversionMap add: ( #Date -> xif SQL_C_DATE ). fetchBufferSizeBlocks add: ( #Date -> [ :ignored | 6 ] ). valueSizeBlocks add: ( #Date -> [ :ignoredValue | 6 ] ). valuePrecisionBlocks add: ( #Date -> [ :ignoredValue | 0 ] ). "Not used by SQLSetParam" "Conversion to/from buffer for Double." getSelectorMap add: ( #Double -> #getDoubleAt: ). putSelectorMap add: ( #Double -> #at:putDouble: ). fSqlTypeToConversionMap add: ( xif SQL_DOUBLE -> #Double ). fSqlTypeToConversionMap add: ( xif SQL_FLOAT -> #Double ). fSqlTypeFromConversionMap add: ( #Double -> xif SQL_DOUBLE ). fCTypeFromConversionMap add: ( #Double -> xif SQL_C_DOUBLE ). fetchBufferSizeBlocks add: ( #Double -> [ :ignored | 8 ] ). valueSizeBlocks add: ( #Double -> [ :ignoredValue | 8 ] ). valuePrecisionBlocks add: ( #Double -> [ :ignoredValue | 0 ] ). "Not used by SQLSetParam" "Conversion to/from buffer for FixedPoint." fSqlTypeToConversionMap add: ( xif SQL_DECIMAL -> #FixedPoint ). getSelectorMap add: ( #FixedPoint -> #getFixedPointAt: ). putSelectorMap add: ( #FixedPoint -> #at:putFixedPoint: ). fSqlTypeToConversionMap add: ( xif SQL_NUMERIC -> #FixedPoint ). fSqlTypeFromConversionMap add: ( #FixedPoint -> xif SQL_DECIMAL ). fCTypeFromConversionMap add: ( #FixedPoint -> xif SQL_C_CHAR ). fetchBufferSizeBlocks add: ( #FixedPoint -> [ :size | size + 3 ] ). "Add room for sign, decimal point, and null byte" valueSizeBlocks add: ( #FixedPoint -> [ :ignoredValue | 34 ] ). "Leave room for sign, decimal point, and null byte" valuePrecisionBlocks add: ( #FixedPoint -> [ :ignoredValue | 31 ] ). "This be the max." "Conversion from buffer for Float." getSelectorMap add: ( #Float -> #getFloatAt: ). putSelectorMap add: ( #Float -> #at:putFloat: ). fSqlTypeToConversionMap add: ( xif SQL_REAL -> #Float ). fSqlTypeFromConversionMap add: ( #Float -> xif SQL_DOUBLE ). fCTypeFromConversionMap add: ( #Float -> xif SQL_C_FLOAT ). fetchBufferSizeBlocks add: ( #Float -> [ :ignored | 4 ] ). valueSizeBlocks add: ( #Float -> [ :ignoredValue | 4 ] ). valuePrecisionBlocks add: ( #Float -> [ :ignoredValue | 0 ] ). "Not used by SQLSetParam" "Conversion from buffer for Integer." getSelectorMap add: ( #Integer -> #getIntegerAt: ). putSelectorMap add: ( #Integer -> #at:putInteger: ). fSqlTypeToConversionMap add: ( xif SQL_SMALLINT -> #Integer ). fSqlTypeToConversionMap add: ( xif SQL_INTEGER -> #Integer ). fSqlTypeFromConversionMap add: ( #Integer -> xif SQL_INTEGER ). fCTypeFromConversionMap add: ( #Integer -> xif SQL_C_LONG ). fetchBufferSizeBlocks add: ( #Integer -> [ :ignored | 4 ] ). valueSizeBlocks add: ( #Integer -> [ :ignoredValue | 4 ] ). valuePrecisionBlocks add: ( #Integer -> [ :ignoredValue | 0 ] ). "Not used by SQLSetParam" "Conversion to/from buffer for LargeInteger." getSelectorMap add: ( #LargeInteger -> #getLargeIntegerAt: ). putSelectorMap add: ( #LargeInteger -> #at:putLargeInteger: ). fSqlTypeToConversionMap add: ( xif SQL_BIGINT -> #LargeInteger ). fSqlTypeFromConversionMap add: ( #LargeInteger -> xif SQL_BIGINT ). fCTypeFromConversionMap add: ( #LargeInteger -> xif SQL_C_CHAR ). fetchBufferSizeBlocks add: ( #LargeInteger -> [ :size | size + 2 ] ). "Add room for sign and null byte" valueSizeBlocks add: ( #LargeInteger -> [ :ignoredValue | 21 ] ). "Leave room for sign and null byte" valuePrecisionBlocks add: ( #LargeInteger -> [ :ignoredValue | 19 ] ). "This be the max." "Conversion from buffer for String. In order to improve the chance that the buffer will hold alternate values without requiring the application to prepare the SQL again, the number of characters (and bytes to allocate) is guaranteed to be at least 256 and never more than the largest size currently known to be supported for the CHAR data types. In between that range, the size is rounded up to the next largest power of 2." getSelectorMap add: ( #String -> #getStringAt: ). putSelectorMap add: ( #String -> #at:putString: ). getSelectorMap add: ( #LargeString -> #getStringAt: ). putSelectorMap add: ( #LargeString -> #at:putString: ). fSqlTypeToConversionMap add: ( xif SQL_CHAR -> #String ). fSqlTypeToConversionMap add: ( xif SQL_VARCHAR -> #String ). fSqlTypeToConversionMap add: ( xif SQL_LONGVARCHAR -> #LargeString ). fSqlTypeToConversionMap add: ( xif SQL_CLOB -> #LargeString ). fSqlTypeToConversionMap add: ( xif SQL_VARIANT -> #String ). fSqlTypeToConversionMap add: ( xif SQL_WLONGVARCHAR -> #LargeString ). fSqlTypeToConversionMap add: ( xif SQL_WVARCHAR -> #String ). fSqlTypeToConversionMap add: ( xif SQL_WCHAR -> #String ). fSqlTypeFromConversionMap add: ( #String -> xif SQL_VARCHAR ). fSqlTypeFromConversionMap add: ( #LargeString -> xif SQL_LONGVARCHAR ). fCTypeFromConversionMap add: ( #String -> xif SQL_C_CHAR ). fCTypeFromConversionMap add: ( #LargeString -> xif SQL_C_CHAR ). charVPB := [ :str | | sz | (sz := str size) <= 255 ifTrue: [ sz ] ifFalse: [ 65536 min: (2 raisedTo: ( (sz floorLog: 2) + 1) ) ] ]. fetchBufferSizeBlocks add: ( #String -> [ :size | size + 1 ] ). "Leave room for a null." fetchBufferSizeBlocks add: ( #LargeString -> [:size | (self getDataChunkSize min: size) + 1 ] ). "Leave room for a null." valueSizeBlocks add: ( #String -> charVPB ). valueSizeBlocks add: ( #LargeString -> [:str | (self getDataChunkSize) + 1 ] ). valuePrecisionBlocks add: ( #String -> charVPB ). valuePrecisionBlocks add: ( #LargeString -> [:str | str size] ). "Conversion from buffer for Time." getSelectorMap add: ( #Time -> #getTimeAt: ). putSelectorMap add: ( #Time -> #at:putTime: ). fSqlTypeToConversionMap add: ( xif SQL_TIME -> #Time ). fSqlTypeFromConversionMap add: ( #Time -> xif SQL_TIMESTAMP ). fCTypeFromConversionMap add: ( #Time -> xif SQL_C_TIME ). fetchBufferSizeBlocks add: ( #Time -> [ :ignored | 6 ] ). valueSizeBlocks add: ( #Time -> [ :ignoredValue | 6 ] ). valuePrecisionBlocks add: ( #Time -> [ :ignoredValue | 0 ] ). "Not used by SQLSetParam" "Conversion from buffer for Timestamp." getSelectorMap add: ( #Timestamp -> #getTimestampAt: ). putSelectorMap add: ( #Timestamp -> #at:putTimestamp: ). fSqlTypeToConversionMap add: ( xif SQL_TIMESTAMP -> #Timestamp ). fSqlTypeFromConversionMap add: ( #Timestamp -> xif SQL_TIMESTAMP ). fCTypeFromConversionMap add: ( #Timestamp -> xif SQL_C_TIMESTAMP ). fetchBufferSizeBlocks add: ( #Timestamp -> [ :ignored | 16 ] ). valueSizeBlocks add: ( #Timestamp -> [ :ignoredValue | 16 ] ). valuePrecisionBlocks add: ( #Timestamp -> [ :ignoredValue | 0 ] ). "Not used by SQLSetParam" "Conversion to/from buffer for Boolean." getSelectorMap add: ( #Boolean -> #getBooleanAt: ). putSelectorMap add: ( #Boolean -> #at:putBoolean: ). fSqlTypeToConversionMap add: ( xif SQL_BIT -> #Boolean ). fSqlTypeFromConversionMap add: ( #Boolean -> xif SQL_BIT ). fCTypeFromConversionMap add: ( #Boolean -> xif SQL_C_BIT ). fetchBufferSizeBlocks add: ( #Boolean -> [ :ignored | 1 ] ). valueSizeBlocks add: ( #Boolean -> [ :ignored | 1 ] ). valuePrecisionBlocks add: ( #Boolean -> [ :ignored | 0 ] ). "Not used by SQLSetParam" "Conversion to/from buffer for ByteArray." "Only used if ODBC.INI option BITDATA = 1" getSelectorMap add: ( #ByteArray -> #getByteArrayAt: ). putSelectorMap add: ( #ByteArray -> #at:putByteArray: ). getSelectorMap add: ( #LargeByteArray -> #getByteArrayAt: ). putSelectorMap add: ( #LargeByteArray -> #at:putByteArray: ). fSqlTypeToConversionMap add: ( xif SQL_BINARY -> #ByteArray ). fSqlTypeToConversionMap add: ( xif SQL_VARBINARY -> #ByteArray ). fSqlTypeToConversionMap add: ( xif SQL_LONGVARBINARY -> #LargeByteArray ). fSqlTypeToConversionMap add: ( xif SQL_BLOB -> #LargeByteArray ). fSqlTypeToConversionMap add: ( xif SQL_GUID -> #ByteArray ). fSqlTypeFromConversionMap add: ( #ByteArray -> xif SQL_VARBINARY ). fSqlTypeFromConversionMap add: ( #LargeByteArray -> xif SQL_LONGVARBINARY ). fCTypeFromConversionMap add: ( #ByteArray -> xif SQL_C_BINARY ). fCTypeFromConversionMap add: ( #LargeByteArray -> xif SQL_C_BINARY ). binVPB := [ :ba | | sz | (sz := ba size) <= 255 ifTrue: [ sz ] ifFalse: [ 65536 min: (2 raisedTo: ( (sz floorLog: 2) + 1)) ] ]. fetchBufferSizeBlocks add: ( #ByteArray -> [ :size | size ] ). fetchBufferSizeBlocks add: ( #LargeByteArray -> [:size | (self getDataChunkSize min: size) ] ). valueSizeBlocks add: ( #ByteArray -> binVPB ). valueSizeBlocks add: ( #LargeByteArray -> [:ba | (self getDataChunkSize) ] ). valuePrecisionBlocks add: ( #ByteArray -> binVPB ). valuePrecisionBlocks add: ( #LargeByteArray -> [:ba | ba size] ). "More conversion from buffer for Integer. Not expected from Informix but the doc says possible." fSqlTypeToConversionMap add: ( xif SQL_TINYINT -> #Integer ).
</methods> <methods> Database.ODBCCLIInterface class <category>private-accessing</category>
fCTypeFromConversionMap ^fCTypeFromConversionMap
fetchBufferSizeBlocks ^fetchBufferSizeBlocks
fSqlTypeFromConversionMap ^fSqlTypeFromConversionMap
fSqlTypeToConversionMap ^fSqlTypeToConversionMap
getSelectorMap ^getSelectorMap
putSelectorMap ^putSelectorMap
valuePrecisionBlocks ^valuePrecisionBlocks
valueSizeBlocks ^valueSizeBlocks
</methods> <methods> Database.ODBCCLIInterface class <category>accessing</category>
getDataChunkSize ^dataChunkSize
setDataChunkSize: anInteger dataChunkSize := anInteger
</methods> <methods> Database.ODBCCLINTInterface <category>types</category>
BOOKMARK <C: typedef unsigned long BOOKMARK>
DATE_STRUCT <C: typedef struct tagDATE_STRUCT DATE_STRUCT>
HDBC <C: typedef void * HDBC>
HENV <C: typedef void * HENV>
HSTMT <C: typedef void * HSTMT>
HWND <C: typedef void * HWND>
LDOUBLE <C: typedef double LDOUBLE>
PSDWORD <C: typedef long * PSDWORD>
PSWORD <C: typedef int * PSWORD>
PTR <C: typedef void * PTR>
PUSDWORD <C: typedef unsigned long * PUSDWORD>
PUSWORD <C: typedef unsigned int * PUSWORD>
RETCODE <C: typedef short RETCODE>
SCHAR <C: typedef char SCHAR>
SDOUBLE <C: typedef double SDOUBLE>
SDWORD <C: typedef long SDWORD>
SFLOAT <C: typedef float SFLOAT>
SLONG <C: typedef long SLONG>
SSHORT <C: typedef short SSHORT>
SWORD <C: typedef short SWORD>
TIMESTAMP_STRUCT <C: typedef struct tagTIMESTAMP_STRUCT TIMESTAMP_STRUCT>
TIME_STRUCT <C: typedef struct tagTIME_STRUCT TIME_STRUCT>
UCHAR <C: typedef unsigned char UCHAR>
UDWORD <C: typedef unsigned long UDWORD>
ULONG <C: typedef unsigned long ULONG>
USHORT <C: typedef unsigned short USHORT>
UWORD <C: typedef unsigned short UWORD>
</methods> <methods> Database.ODBCCLINTInterface <category>structs</category>
tagDATE_STRUCT <C: struct tagDATE_STRUCT { SWORD year; UWORD month, day; }>
tagTIMESTAMP_STRUCT <C: struct tagTIMESTAMP_STRUCT { SWORD year; UWORD month, day, hour, minute, second; UDWORD fraction; }>
tagTIME_STRUCT <C: struct tagTIME_STRUCT { UWORD hour, minute, second; }>
</methods> <methods> Database.ODBCCLINTInterface <category>defines</category>
EXPORT <C: #define EXPORT _export >
FAR <C: #define FAR >
ODBCVER <C: #define ODBCVER 528 >
SQL_ACCESSIBLE_PROCEDURES <C: #define SQL_ACCESSIBLE_PROCEDURES 20 >
SQL_ACCESSIBLE_TABLES <C: #define SQL_ACCESSIBLE_TABLES 19 >
SQL_ACCESS_MODE <C: #define SQL_ACCESS_MODE 101 >
SQL_ACTIVE_CONNECTIONS <C: #define SQL_ACTIVE_CONNECTIONS 0 >
SQL_ACTIVE_STATEMENTS <C: #define SQL_ACTIVE_STATEMENTS 1 >
SQL_ADD <C: #define SQL_ADD 4 >
SQL_ALL_EXCEPT_LIKE <C: #define SQL_ALL_EXCEPT_LIKE 2 >
SQL_ALL_TYPES <C: #define SQL_ALL_TYPES 0 >
SQL_ALTER_TABLE <C: #define SQL_ALTER_TABLE 86 >
SQL_API <C: #define SQL_API >
SQL_API_ALL_FUNCTIONS <C: #define SQL_API_ALL_FUNCTIONS 0 >
SQL_API_LOADBYORDINAL <C: #define SQL_API_LOADBYORDINAL 199 >
SQL_API_SQLALLOCCONNECT <C: #define SQL_API_SQLALLOCCONNECT 1 >
SQL_API_SQLALLOCENV <C: #define SQL_API_SQLALLOCENV 2 >
SQL_API_SQLALLOCSTMT <C: #define SQL_API_SQLALLOCSTMT 3 >
SQL_API_SQLBINDCOL <C: #define SQL_API_SQLBINDCOL 4 >
SQL_API_SQLBINDPARAMETER <C: #define SQL_API_SQLBINDPARAMETER 72 >
SQL_API_SQLBROWSECONNECT <C: #define SQL_API_SQLBROWSECONNECT 55 >
SQL_API_SQLCANCEL <C: #define SQL_API_SQLCANCEL 5 >
SQL_API_SQLCOLATTRIBUTES <C: #define SQL_API_SQLCOLATTRIBUTES 6 >
SQL_API_SQLCOLUMNPRIVILEGES <C: #define SQL_API_SQLCOLUMNPRIVILEGES 56 >
SQL_API_SQLCOLUMNS <C: #define SQL_API_SQLCOLUMNS 40 >
SQL_API_SQLCONNECT <C: #define SQL_API_SQLCONNECT 7 >
SQL_API_SQLDATASOURCES <C: #define SQL_API_SQLDATASOURCES 57 >
SQL_API_SQLDESCRIBECOL <C: #define SQL_API_SQLDESCRIBECOL 8 >
SQL_API_SQLDESCRIBEPARAM <C: #define SQL_API_SQLDESCRIBEPARAM 58 >
SQL_API_SQLDISCONNECT <C: #define SQL_API_SQLDISCONNECT 9 >
SQL_API_SQLDRIVERCONNECT <C: #define SQL_API_SQLDRIVERCONNECT 41 >
SQL_API_SQLDRIVERS <C: #define SQL_API_SQLDRIVERS 71 >
SQL_API_SQLERROR <C: #define SQL_API_SQLERROR 10 >
SQL_API_SQLEXECDIRECT <C: #define SQL_API_SQLEXECDIRECT 11 >
SQL_API_SQLEXECUTE <C: #define SQL_API_SQLEXECUTE 12 >
SQL_API_SQLEXTENDEDFETCH <C: #define SQL_API_SQLEXTENDEDFETCH 59 >
SQL_API_SQLFETCH <C: #define SQL_API_SQLFETCH 13 >
SQL_API_SQLFOREIGNKEYS <C: #define SQL_API_SQLFOREIGNKEYS 60 >
SQL_API_SQLFREECONNECT <C: #define SQL_API_SQLFREECONNECT 14 >
SQL_API_SQLFREEENV <C: #define SQL_API_SQLFREEENV 15 >
SQL_API_SQLFREESTMT <C: #define SQL_API_SQLFREESTMT 16 >
SQL_API_SQLGETCONNECTOPTION <C: #define SQL_API_SQLGETCONNECTOPTION 42 >
SQL_API_SQLGETCURSORNAME <C: #define SQL_API_SQLGETCURSORNAME 17 >
SQL_API_SQLGETDATA <C: #define SQL_API_SQLGETDATA 43 >
SQL_API_SQLGETFUNCTIONS <C: #define SQL_API_SQLGETFUNCTIONS 44 >
SQL_API_SQLGETINFO <C: #define SQL_API_SQLGETINFO 45 >
SQL_API_SQLGETSTMTOPTION <C: #define SQL_API_SQLGETSTMTOPTION 46 >
SQL_API_SQLGETTYPEINFO <C: #define SQL_API_SQLGETTYPEINFO 47 >
SQL_API_SQLMORERESULTS <C: #define SQL_API_SQLMORERESULTS 61 >
SQL_API_SQLNATIVESQL <C: #define SQL_API_SQLNATIVESQL 62 >
SQL_API_SQLNUMPARAMS <C: #define SQL_API_SQLNUMPARAMS 63 >
SQL_API_SQLNUMRESULTCOLS <C: #define SQL_API_SQLNUMRESULTCOLS 18 >
SQL_API_SQLPARAMDATA <C: #define SQL_API_SQLPARAMDATA 48 >
SQL_API_SQLPARAMOPTIONS <C: #define SQL_API_SQLPARAMOPTIONS 64 >
SQL_API_SQLPREPARE <C: #define SQL_API_SQLPREPARE 19 >
SQL_API_SQLPRIMARYKEYS <C: #define SQL_API_SQLPRIMARYKEYS 65 >
SQL_API_SQLPROCEDURECOLUMNS <C: #define SQL_API_SQLPROCEDURECOLUMNS 66 >
SQL_API_SQLPROCEDURES <C: #define SQL_API_SQLPROCEDURES 67 >
SQL_API_SQLPUTDATA <C: #define SQL_API_SQLPUTDATA 49 >
SQL_API_SQLROWCOUNT <C: #define SQL_API_SQLROWCOUNT 20 >
SQL_API_SQLSETCONNECTOPTION <C: #define SQL_API_SQLSETCONNECTOPTION 50 >
SQL_API_SQLSETCURSORNAME <C: #define SQL_API_SQLSETCURSORNAME 21 >
SQL_API_SQLSETPARAM <C: #define SQL_API_SQLSETPARAM 22 >
SQL_API_SQLSETPOS <C: #define SQL_API_SQLSETPOS 68 >
SQL_API_SQLSETSCROLLOPTIONS <C: #define SQL_API_SQLSETSCROLLOPTIONS 69 >
SQL_API_SQLSETSTMTOPTION <C: #define SQL_API_SQLSETSTMTOPTION 51 >
SQL_API_SQLSPECIALCOLUMNS <C: #define SQL_API_SQLSPECIALCOLUMNS 52 >
SQL_API_SQLSTATISTICS <C: #define SQL_API_SQLSTATISTICS 53 >
SQL_API_SQLTABLEPRIVILEGES <C: #define SQL_API_SQLTABLEPRIVILEGES 70 >
SQL_API_SQLTABLES <C: #define SQL_API_SQLTABLES 54 >
SQL_API_SQLTRANSACT <C: #define SQL_API_SQLTRANSACT 23 >
SQL_ASYNC_ENABLE <C: #define SQL_ASYNC_ENABLE 4 >
SQL_ASYNC_ENABLE_DEFAULT <C: #define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF >
SQL_ASYNC_ENABLE_OFF <C: #define SQL_ASYNC_ENABLE_OFF 0L >
SQL_ASYNC_ENABLE_ON <C: #define SQL_ASYNC_ENABLE_ON 1L >
SQL_ATTR_READONLY <C: #define SQL_ATTR_READONLY 0 >
SQL_ATTR_READWRITE_UNKNOWN <C: #define SQL_ATTR_READWRITE_UNKNOWN 2 >
SQL_ATTR_WRITE <C: #define SQL_ATTR_WRITE 1 >
SQL_AT_ADD_COLUMN <C: #define SQL_AT_ADD_COLUMN 0x00000001 >
SQL_AT_DROP_COLUMN <C: #define SQL_AT_DROP_COLUMN 0x00000002 >
SQL_AUTOCOMMIT <C: #define SQL_AUTOCOMMIT 102 >
SQL_AUTOCOMMIT_DEFAULT <C: #define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON >
SQL_AUTOCOMMIT_OFF <C: #define SQL_AUTOCOMMIT_OFF 0L >
SQL_AUTOCOMMIT_ON <C: #define SQL_AUTOCOMMIT_ON 1L >
SQL_BEST_ROWID <C: #define SQL_BEST_ROWID 1 >
SQL_BIGINT <C: #define SQL_BIGINT (-5) >
SQL_BINARY <C: #define SQL_BINARY (-2) >
SQL_BIND_BY_COLUMN <C: #define SQL_BIND_BY_COLUMN 0L >
SQL_BIND_TYPE <C: #define SQL_BIND_TYPE 5 >
SQL_BIND_TYPE_DEFAULT <C: #define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN >
SQL_BIT <C: #define SQL_BIT (-7) >
SQL_BOOKMARK_PERSISTENCE <C: #define SQL_BOOKMARK_PERSISTENCE 82 >
SQL_BP_CLOSE <C: #define SQL_BP_CLOSE 0x00000001 >
SQL_BP_DELETE <C: #define SQL_BP_DELETE 0x00000002 >
SQL_BP_DROP <C: #define SQL_BP_DROP 0x00000004 >
SQL_BP_OTHER_HSTMT <C: #define SQL_BP_OTHER_HSTMT 0x00000020 >
SQL_BP_SCROLL <C: #define SQL_BP_SCROLL 0x00000040 >
SQL_BP_TRANSACTION <C: #define SQL_BP_TRANSACTION 0x00000008 >
SQL_BP_UPDATE <C: #define SQL_BP_UPDATE 0x00000010 >
SQL_CASCADE <C: #define SQL_CASCADE 0 >
SQL_CB_CLOSE <C: #define SQL_CB_CLOSE 0x0001 >
SQL_CB_DELETE <C: #define SQL_CB_DELETE 0x0000 >
SQL_CB_NON_NULL <C: #define SQL_CB_NON_NULL 0x0001 >
SQL_CB_NULL <C: #define SQL_CB_NULL 0x0000 >
SQL_CB_PRESERVE <C: #define SQL_CB_PRESERVE 0x0002 >
SQL_CC_CLOSE <C: #define SQL_CC_CLOSE SQL_CB_CLOSE >
SQL_CC_DELETE <C: #define SQL_CC_DELETE SQL_CB_DELETE >
SQL_CC_PRESERVE <C: #define SQL_CC_PRESERVE SQL_CB_PRESERVE >
SQL_CHAR <C: #define SQL_CHAR 1 >
SQL_CLOSE <C: #define SQL_CLOSE 0 >
SQL_CN_ANY <C: #define SQL_CN_ANY 0x0002 >
SQL_CN_DIFFERENT <C: #define SQL_CN_DIFFERENT 0x0001 >
SQL_CN_NONE <C: #define SQL_CN_NONE 0x0000 >
SQL_COLATT_OPT_MAX <C: #define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL >
SQL_COLATT_OPT_MIN <C: #define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT >
SQL_COLUMN_ALIAS <C: #define SQL_COLUMN_ALIAS 87 >
SQL_COLUMN_AUTO_INCREMENT <C: #define SQL_COLUMN_AUTO_INCREMENT 11 >
SQL_COLUMN_CASE_SENSITIVE <C: #define SQL_COLUMN_CASE_SENSITIVE 12 >
SQL_COLUMN_COUNT <C: #define SQL_COLUMN_COUNT 0 >
SQL_COLUMN_DISPLAY_SIZE <C: #define SQL_COLUMN_DISPLAY_SIZE 6 >
SQL_COLUMN_DRIVER_START <C: #define SQL_COLUMN_DRIVER_START 1000 >
SQL_COLUMN_LABEL <C: #define SQL_COLUMN_LABEL 18 >
SQL_COLUMN_LENGTH <C: #define SQL_COLUMN_LENGTH 3 >
SQL_COLUMN_MONEY <C: #define SQL_COLUMN_MONEY 9 >
SQL_COLUMN_NAME <C: #define SQL_COLUMN_NAME 1 >
SQL_COLUMN_NULLABLE <C: #define SQL_COLUMN_NULLABLE 7 >
SQL_COLUMN_OWNER_NAME <C: #define SQL_COLUMN_OWNER_NAME 16 >
SQL_COLUMN_PRECISION <C: #define SQL_COLUMN_PRECISION 4 >
SQL_COLUMN_QUALIFIER_NAME <C: #define SQL_COLUMN_QUALIFIER_NAME 17 >
SQL_COLUMN_SCALE <C: #define SQL_COLUMN_SCALE 5 >
SQL_COLUMN_SEARCHABLE <C: #define SQL_COLUMN_SEARCHABLE 13 >
SQL_COLUMN_TABLE_NAME <C: #define SQL_COLUMN_TABLE_NAME 15 >
SQL_COLUMN_TYPE <C: #define SQL_COLUMN_TYPE 2 >
SQL_COLUMN_TYPE_NAME <C: #define SQL_COLUMN_TYPE_NAME 14 >
SQL_COLUMN_UNSIGNED <C: #define SQL_COLUMN_UNSIGNED 8 >
SQL_COLUMN_UPDATABLE <C: #define SQL_COLUMN_UPDATABLE 10 >
SQL_COMMIT <C: #define SQL_COMMIT 0 >
SQL_CONCAT_NULL_BEHAVIOR <C: #define SQL_CONCAT_NULL_BEHAVIOR 22 >
SQL_CONCURRENCY <C: #define SQL_CONCURRENCY 7 >
SQL_CONCUR_DEFAULT <C: #define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY >
SQL_CONCUR_LOCK <C: #define SQL_CONCUR_LOCK 2 >
SQL_CONCUR_READ_ONLY <C: #define SQL_CONCUR_READ_ONLY 1 >
SQL_CONCUR_ROWVER <C: #define SQL_CONCUR_ROWVER 3 >
SQL_CONCUR_TIMESTAMP <C: #define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER >
SQL_CONCUR_VALUES <C: #define SQL_CONCUR_VALUES 4 >
SQL_CONNECT_OPT_DRVR_START <C: #define SQL_CONNECT_OPT_DRVR_START 1000 >
SQL_CONN_OPT_MAX <C: #define SQL_CONN_OPT_MAX SQL_PACKET_SIZE >
SQL_CONN_OPT_MIN <C: #define SQL_CONN_OPT_MIN SQL_ACCESS_MODE >
SQL_CONVERT_BIGINT <C: #define SQL_CONVERT_BIGINT 53 >
SQL_CONVERT_BINARY <C: #define SQL_CONVERT_BINARY 54 >
SQL_CONVERT_BIT <C: #define SQL_CONVERT_BIT 55 >
SQL_CONVERT_CHAR <C: #define SQL_CONVERT_CHAR 56 >
SQL_CONVERT_DATE <C: #define SQL_CONVERT_DATE 57 >
SQL_CONVERT_DECIMAL <C: #define SQL_CONVERT_DECIMAL 58 >
SQL_CONVERT_DOUBLE <C: #define SQL_CONVERT_DOUBLE 59 >
SQL_CONVERT_FLOAT <C: #define SQL_CONVERT_FLOAT 60 >
SQL_CONVERT_FUNCTIONS <C: #define SQL_CONVERT_FUNCTIONS 48 >
SQL_CONVERT_INTEGER <C: #define SQL_CONVERT_INTEGER 61 >
SQL_CONVERT_LONGVARBINARY <C: #define SQL_CONVERT_LONGVARBINARY 71 >
SQL_CONVERT_LONGVARCHAR <C: #define SQL_CONVERT_LONGVARCHAR 62 >
SQL_CONVERT_NUMERIC <C: #define SQL_CONVERT_NUMERIC 63 >
SQL_CONVERT_REAL <C: #define SQL_CONVERT_REAL 64 >
SQL_CONVERT_SMALLINT <C: #define SQL_CONVERT_SMALLINT 65 >
SQL_CONVERT_TIME <C: #define SQL_CONVERT_TIME 66 >
SQL_CONVERT_TIMESTAMP <C: #define SQL_CONVERT_TIMESTAMP 67 >
SQL_CONVERT_TINYINT <C: #define SQL_CONVERT_TINYINT 68 >
SQL_CONVERT_VARBINARY <C: #define SQL_CONVERT_VARBINARY 69 >
SQL_CONVERT_VARCHAR <C: #define SQL_CONVERT_VARCHAR 70 >
SQL_CORRELATION_NAME <C: #define SQL_CORRELATION_NAME 74 >
SQL_CR_CLOSE <C: #define SQL_CR_CLOSE SQL_CB_CLOSE >
SQL_CR_DELETE <C: #define SQL_CR_DELETE SQL_CB_DELETE >
SQL_CR_PRESERVE <C: #define SQL_CR_PRESERVE SQL_CB_PRESERVE >
SQL_CURRENT_QUALIFIER <C: #define SQL_CURRENT_QUALIFIER 109 >
SQL_CURSOR_COMMIT_BEHAVIOR <C: #define SQL_CURSOR_COMMIT_BEHAVIOR 23 >
SQL_CURSOR_DYNAMIC <C: #define SQL_CURSOR_DYNAMIC 2L >
SQL_CURSOR_FORWARD_ONLY <C: #define SQL_CURSOR_FORWARD_ONLY 0L >
SQL_CURSOR_KEYSET_DRIVEN <C: #define SQL_CURSOR_KEYSET_DRIVEN 1L >
SQL_CURSOR_ROLLBACK_BEHAVIOR <C: #define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 >
SQL_CURSOR_STATIC <C: #define SQL_CURSOR_STATIC 3L >
SQL_CURSOR_TYPE <C: #define SQL_CURSOR_TYPE 6 >
SQL_CURSOR_TYPE_DEFAULT <C: #define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY >
SQL_CUR_DEFAULT <C: #define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER >
SQL_CUR_USE_DRIVER <C: #define SQL_CUR_USE_DRIVER 2L >
SQL_CUR_USE_IF_NEEDED <C: #define SQL_CUR_USE_IF_NEEDED 0L >
SQL_CUR_USE_ODBC <C: #define SQL_CUR_USE_ODBC 1L >
SQL_CVT_BIGINT <C: #define SQL_CVT_BIGINT 0x00004000 >
SQL_CVT_BINARY <C: #define SQL_CVT_BINARY 0x00000400 >
SQL_CVT_BIT <C: #define SQL_CVT_BIT 0x00001000 >
SQL_CVT_CHAR <C: #define SQL_CVT_CHAR 0x00000001 >
SQL_CVT_DATE <C: #define SQL_CVT_DATE 0x00008000 >
SQL_CVT_DECIMAL <C: #define SQL_CVT_DECIMAL 0x00000004 >
SQL_CVT_DOUBLE <C: #define SQL_CVT_DOUBLE 0x00000080 >
SQL_CVT_FLOAT <C: #define SQL_CVT_FLOAT 0x00000020 >
SQL_CVT_INTEGER <C: #define SQL_CVT_INTEGER 0x00000008 >
SQL_CVT_LONGVARBINARY <C: #define SQL_CVT_LONGVARBINARY 0x00040000 >
SQL_CVT_LONGVARCHAR <C: #define SQL_CVT_LONGVARCHAR 0x00000200 >
SQL_CVT_NUMERIC <C: #define SQL_CVT_NUMERIC 0x00000002 >
SQL_CVT_REAL <C: #define SQL_CVT_REAL 0x00000040 >
SQL_CVT_SMALLINT <C: #define SQL_CVT_SMALLINT 0x00000010 >
SQL_CVT_TIME <C: #define SQL_CVT_TIME 0x00010000 >
SQL_CVT_TIMESTAMP <C: #define SQL_CVT_TIMESTAMP 0x00020000 >
SQL_CVT_TINYINT <C: #define SQL_CVT_TINYINT 0x00002000 >
SQL_CVT_VARBINARY <C: #define SQL_CVT_VARBINARY 0x00000800 >
SQL_CVT_VARCHAR <C: #define SQL_CVT_VARCHAR 0x00000100 >
SQL_C_BINARY <C: #define SQL_C_BINARY SQL_BINARY >
SQL_C_BIT <C: #define SQL_C_BIT SQL_BIT >
SQL_C_BOOKMARK <C: #define SQL_C_BOOKMARK SQL_C_ULONG >
SQL_C_CHAR <C: #define SQL_C_CHAR SQL_CHAR >
SQL_C_DATE <C: #define SQL_C_DATE SQL_DATE >
SQL_C_DEFAULT <C: #define SQL_C_DEFAULT 99 >
SQL_C_DOUBLE <C: #define SQL_C_DOUBLE SQL_DOUBLE >
SQL_C_FLOAT <C: #define SQL_C_FLOAT SQL_REAL >
SQL_C_LONG <C: #define SQL_C_LONG SQL_INTEGER >
SQL_C_SHORT <C: #define SQL_C_SHORT SQL_SMALLINT >
SQL_C_SLONG <C: #define SQL_C_SLONG SQL_C_LONG+SQL_SIGNED_OFFSET >
SQL_C_SSHORT <C: #define SQL_C_SSHORT SQL_C_SHORT+SQL_SIGNED_OFFSET >
SQL_C_STINYINT <C: #define SQL_C_STINYINT SQL_TINYINT+SQL_SIGNED_OFFSET >
SQL_C_TIME <C: #define SQL_C_TIME SQL_TIME >
SQL_C_TIMESTAMP <C: #define SQL_C_TIMESTAMP SQL_TIMESTAMP >
SQL_C_TINYINT <C: #define SQL_C_TINYINT SQL_TINYINT >
SQL_C_ULONG <C: #define SQL_C_ULONG SQL_C_LONG+SQL_UNSIGNED_OFFSET >
SQL_C_USHORT <C: #define SQL_C_USHORT SQL_C_SHORT+SQL_UNSIGNED_OFFSET >
SQL_C_UTINYINT <C: #define SQL_C_UTINYINT SQL_TINYINT+SQL_UNSIGNED_OFFSET >
SQL_DATABASE_NAME <C: #define SQL_DATABASE_NAME 16 >
SQL_DATA_AT_EXEC <C: #define SQL_DATA_AT_EXEC (-2) >
SQL_DATA_SOURCE_NAME <C: #define SQL_DATA_SOURCE_NAME 2 >
SQL_DATA_SOURCE_READ_ONLY <C: #define SQL_DATA_SOURCE_READ_ONLY 25 >
SQL_DATE <C: #define SQL_DATE 9 >
SQL_DBMS_NAME <C: #define SQL_DBMS_NAME 17 >
SQL_DBMS_VER <C: #define SQL_DBMS_VER 18 >
SQL_DECIMAL <C: #define SQL_DECIMAL 3 >
SQL_DEFAULT_PARAM <C: #define SQL_DEFAULT_PARAM (-5) >
SQL_DEFAULT_TXN_ISOLATION <C: #define SQL_DEFAULT_TXN_ISOLATION 26 >
SQL_DELETE <C: #define SQL_DELETE 3 >
SQL_DOUBLE <C: #define SQL_DOUBLE 8 >
SQL_DRIVER_COMPLETE <C: #define SQL_DRIVER_COMPLETE 1 >
SQL_DRIVER_COMPLETE_REQUIRED <C: #define SQL_DRIVER_COMPLETE_REQUIRED 3 >
SQL_DRIVER_HDBC <C: #define SQL_DRIVER_HDBC 3 >
SQL_DRIVER_HENV <C: #define SQL_DRIVER_HENV 4 >
SQL_DRIVER_HLIB <C: #define SQL_DRIVER_HLIB 76 >
SQL_DRIVER_HSTMT <C: #define SQL_DRIVER_HSTMT 5 >
SQL_DRIVER_NAME <C: #define SQL_DRIVER_NAME 6 >
SQL_DRIVER_NOPROMPT <C: #define SQL_DRIVER_NOPROMPT 0 >
SQL_DRIVER_ODBC_VER <C: #define SQL_DRIVER_ODBC_VER 77 >
SQL_DRIVER_PROMPT <C: #define SQL_DRIVER_PROMPT 2 >
SQL_DRIVER_VER <C: #define SQL_DRIVER_VER 7 >
SQL_DROP <C: #define SQL_DROP 1 >
SQL_ENSURE <C: #define SQL_ENSURE 1 >
SQL_ENTIRE_ROWSET <C: #define SQL_ENTIRE_ROWSET 0 >
SQL_ERROR <C: #define SQL_ERROR (-1) >
SQL_EXPRESSIONS_IN_ORDERBY <C: #define SQL_EXPRESSIONS_IN_ORDERBY 27 >
SQL_EXT_API_LAST <C: #define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER >
SQL_EXT_API_START <C: #define SQL_EXT_API_START 40 >
SQL_FD_FETCH_ABSOLUTE <C: #define SQL_FD_FETCH_ABSOLUTE 0x00000010 >
SQL_FD_FETCH_BOOKMARK <C: #define SQL_FD_FETCH_BOOKMARK 0x00000080 >
SQL_FD_FETCH_FIRST <C: #define SQL_FD_FETCH_FIRST 0x00000002 >
SQL_FD_FETCH_LAST <C: #define SQL_FD_FETCH_LAST 0x00000004 >
SQL_FD_FETCH_NEXT <C: #define SQL_FD_FETCH_NEXT 0x00000001 >
SQL_FD_FETCH_PREV <C: #define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR >
SQL_FD_FETCH_PRIOR <C: #define SQL_FD_FETCH_PRIOR 0x00000008 >
SQL_FD_FETCH_RELATIVE <C: #define SQL_FD_FETCH_RELATIVE 0x00000020 >
SQL_FD_FETCH_RESUME <C: #define SQL_FD_FETCH_RESUME 0x00000040 >
SQL_FETCH_ABSOLUTE <C: #define SQL_FETCH_ABSOLUTE 5 >
SQL_FETCH_BOOKMARK <C: #define SQL_FETCH_BOOKMARK 8 >
SQL_FETCH_DIRECTION <C: #define SQL_FETCH_DIRECTION 8 >
SQL_FETCH_FIRST <C: #define SQL_FETCH_FIRST 2 >
SQL_FETCH_LAST <C: #define SQL_FETCH_LAST 3 >
SQL_FETCH_NEXT <C: #define SQL_FETCH_NEXT 1 >
SQL_FETCH_PREV <C: #define SQL_FETCH_PREV SQL_FETCH_PRIOR >
SQL_FETCH_PRIOR <C: #define SQL_FETCH_PRIOR 4 >
SQL_FETCH_RELATIVE <C: #define SQL_FETCH_RELATIVE 6 >
SQL_FETCH_RESUME <C: #define SQL_FETCH_RESUME 7 >
SQL_FILE_NOT_SUPPORTED <C: #define SQL_FILE_NOT_SUPPORTED 0x0000 >
SQL_FILE_QUALIFIER <C: #define SQL_FILE_QUALIFIER 0x0002 >
SQL_FILE_TABLE <C: #define SQL_FILE_TABLE 0x0001 >
SQL_FILE_USAGE <C: #define SQL_FILE_USAGE 84 >
SQL_FLOAT <C: #define SQL_FLOAT 6 >
SQL_FN_CVT_CONVERT <C: #define SQL_FN_CVT_CONVERT 0x00000001 >
SQL_FN_NUM_ABS <C: #define SQL_FN_NUM_ABS 0x00000001 >
SQL_FN_NUM_ACOS <C: #define SQL_FN_NUM_ACOS 0x00000002 >
SQL_FN_NUM_ASIN <C: #define SQL_FN_NUM_ASIN 0x00000004 >
SQL_FN_NUM_ATAN <C: #define SQL_FN_NUM_ATAN 0x00000008 >
SQL_FN_NUM_ATAN2 <C: #define SQL_FN_NUM_ATAN2 0x00000010 >
SQL_FN_NUM_CEILING <C: #define SQL_FN_NUM_CEILING 0x00000020 >
SQL_FN_NUM_COS <C: #define SQL_FN_NUM_COS 0x00000040 >
SQL_FN_NUM_COT <C: #define SQL_FN_NUM_COT 0x00000080 >
SQL_FN_NUM_DEGREES <C: #define SQL_FN_NUM_DEGREES 0x00040000 >
SQL_FN_NUM_EXP <C: #define SQL_FN_NUM_EXP 0x00000100 >
SQL_FN_NUM_FLOOR <C: #define SQL_FN_NUM_FLOOR 0x00000200 >
SQL_FN_NUM_LOG <C: #define SQL_FN_NUM_LOG 0x00000400 >
SQL_FN_NUM_LOG10 <C: #define SQL_FN_NUM_LOG10 0x00080000 >
SQL_FN_NUM_MOD <C: #define SQL_FN_NUM_MOD 0x00000800 >
SQL_FN_NUM_PI <C: #define SQL_FN_NUM_PI 0x00010000 >
SQL_FN_NUM_POWER <C: #define SQL_FN_NUM_POWER 0x00100000 >
SQL_FN_NUM_RADIANS <C: #define SQL_FN_NUM_RADIANS 0x00200000 >
SQL_FN_NUM_RAND <C: #define SQL_FN_NUM_RAND 0x00020000 >
SQL_FN_NUM_ROUND <C: #define SQL_FN_NUM_ROUND 0x00400000 >
SQL_FN_NUM_SIGN <C: #define SQL_FN_NUM_SIGN 0x00001000 >
SQL_FN_NUM_SIN <C: #define SQL_FN_NUM_SIN 0x00002000 >
SQL_FN_NUM_SQRT <C: #define SQL_FN_NUM_SQRT 0x00004000 >
SQL_FN_NUM_TAN <C: #define SQL_FN_NUM_TAN 0x00008000 >
SQL_FN_NUM_TRUNCATE <C: #define SQL_FN_NUM_TRUNCATE 0x00800000 >
SQL_FN_STR_ASCII <C: #define SQL_FN_STR_ASCII 0x00002000 >
SQL_FN_STR_CHAR <C: #define SQL_FN_STR_CHAR 0x00004000 >
SQL_FN_STR_CONCAT <C: #define SQL_FN_STR_CONCAT 0x00000001 >
SQL_FN_STR_DIFFERENCE <C: #define SQL_FN_STR_DIFFERENCE 0x00008000 >
SQL_FN_STR_INSERT <C: #define SQL_FN_STR_INSERT 0x00000002 >
SQL_FN_STR_LCASE <C: #define SQL_FN_STR_LCASE 0x00000040 >
SQL_FN_STR_LEFT <C: #define SQL_FN_STR_LEFT 0x00000004 >
SQL_FN_STR_LENGTH <C: #define SQL_FN_STR_LENGTH 0x00000010 >
SQL_FN_STR_LOCATE <C: #define SQL_FN_STR_LOCATE 0x00000020 >
SQL_FN_STR_LOCATE_2 <C: #define SQL_FN_STR_LOCATE_2 0x00010000 >
SQL_FN_STR_LTRIM <C: #define SQL_FN_STR_LTRIM 0x00000008 >
SQL_FN_STR_REPEAT <C: #define SQL_FN_STR_REPEAT 0x00000080 >
SQL_FN_STR_REPLACE <C: #define SQL_FN_STR_REPLACE 0x00000100 >
SQL_FN_STR_RIGHT <C: #define SQL_FN_STR_RIGHT 0x00000200 >
SQL_FN_STR_RTRIM <C: #define SQL_FN_STR_RTRIM 0x00000400 >
SQL_FN_STR_SOUNDEX <C: #define SQL_FN_STR_SOUNDEX 0x00020000 >
SQL_FN_STR_SPACE <C: #define SQL_FN_STR_SPACE 0x00040000 >
SQL_FN_STR_SUBSTRING <C: #define SQL_FN_STR_SUBSTRING 0x00000800 >
SQL_FN_STR_UCASE <C: #define SQL_FN_STR_UCASE 0x00001000 >
SQL_FN_SYS_DBNAME <C: #define SQL_FN_SYS_DBNAME 0x00000002 >
SQL_FN_SYS_IFNULL <C: #define SQL_FN_SYS_IFNULL 0x00000004 >
SQL_FN_SYS_USERNAME <C: #define SQL_FN_SYS_USERNAME 0x00000001 >
SQL_FN_TD_CURDATE <C: #define SQL_FN_TD_CURDATE 0x00000002 >
SQL_FN_TD_CURTIME <C: #define SQL_FN_TD_CURTIME 0x00000200 >
SQL_FN_TD_DAYNAME <C: #define SQL_FN_TD_DAYNAME 0x00008000 >
SQL_FN_TD_DAYOFMONTH <C: #define SQL_FN_TD_DAYOFMONTH 0x00000004 >
SQL_FN_TD_DAYOFWEEK <C: #define SQL_FN_TD_DAYOFWEEK 0x00000008 >
SQL_FN_TD_DAYOFYEAR <C: #define SQL_FN_TD_DAYOFYEAR 0x00000010 >
SQL_FN_TD_HOUR <C: #define SQL_FN_TD_HOUR 0x00000400 >
SQL_FN_TD_MINUTE <C: #define SQL_FN_TD_MINUTE 0x00000800 >
SQL_FN_TD_MONTH <C: #define SQL_FN_TD_MONTH 0x00000020 >
SQL_FN_TD_MONTHNAME <C: #define SQL_FN_TD_MONTHNAME 0x00010000 >
SQL_FN_TD_NOW <C: #define SQL_FN_TD_NOW 0x00000001 >
SQL_FN_TD_QUARTER <C: #define SQL_FN_TD_QUARTER 0x00000040 >
SQL_FN_TD_SECOND <C: #define SQL_FN_TD_SECOND 0x00001000 >
SQL_FN_TD_TIMESTAMPADD <C: #define SQL_FN_TD_TIMESTAMPADD 0x00002000 >
SQL_FN_TD_TIMESTAMPDIFF <C: #define SQL_FN_TD_TIMESTAMPDIFF 0x00004000 >
SQL_FN_TD_WEEK <C: #define SQL_FN_TD_WEEK 0x00000080 >
SQL_FN_TD_YEAR <C: #define SQL_FN_TD_YEAR 0x00000100 >
SQL_FN_TSI_DAY <C: #define SQL_FN_TSI_DAY 0x00000010 >
SQL_FN_TSI_FRAC_SECOND <C: #define SQL_FN_TSI_FRAC_SECOND 0x00000001 >
SQL_FN_TSI_HOUR <C: #define SQL_FN_TSI_HOUR 0x00000008 >
SQL_FN_TSI_MINUTE <C: #define SQL_FN_TSI_MINUTE 0x00000004 >
SQL_FN_TSI_MONTH <C: #define SQL_FN_TSI_MONTH 0x00000040 >
SQL_FN_TSI_QUARTER <C: #define SQL_FN_TSI_QUARTER 0x00000080 >
SQL_FN_TSI_SECOND <C: #define SQL_FN_TSI_SECOND 0x00000002 >
SQL_FN_TSI_WEEK <C: #define SQL_FN_TSI_WEEK 0x00000020 >
SQL_FN_TSI_YEAR <C: #define SQL_FN_TSI_YEAR 0x00000100 >
SQL_GB_GROUP_BY_CONTAINS_SELECT <C: #define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002 >
SQL_GB_GROUP_BY_EQUALS_SELECT <C: #define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 >
SQL_GB_NOT_SUPPORTED <C: #define SQL_GB_NOT_SUPPORTED 0x0000 >
SQL_GB_NO_RELATION <C: #define SQL_GB_NO_RELATION 0x0003 >
SQL_GD_ANY_COLUMN <C: #define SQL_GD_ANY_COLUMN 0x00000001 >
SQL_GD_ANY_ORDER <C: #define SQL_GD_ANY_ORDER 0x00000002 >
SQL_GD_BLOCK <C: #define SQL_GD_BLOCK 0x00000004 >
SQL_GD_BOUND <C: #define SQL_GD_BOUND 0x00000008 >
SQL_GETDATA_EXTENSIONS <C: #define SQL_GETDATA_EXTENSIONS 81 >
SQL_GET_BOOKMARK <C: #define SQL_GET_BOOKMARK 13 >
SQL_GROUP_BY <C: #define SQL_GROUP_BY 88 >
SQL_IC_LOWER <C: #define SQL_IC_LOWER 0x0002 >
SQL_IC_MIXED <C: #define SQL_IC_MIXED 0x0004 >
SQL_IC_SENSITIVE <C: #define SQL_IC_SENSITIVE 0x0003 >
SQL_IC_UPPER <C: #define SQL_IC_UPPER 0x0001 >
SQL_IDENTIFIER_CASE <C: #define SQL_IDENTIFIER_CASE 28 >
SQL_IDENTIFIER_QUOTE_CHAR <C: #define SQL_IDENTIFIER_QUOTE_CHAR 29 >
SQL_IGNORE <C: #define SQL_IGNORE (-6) >
SQL_INDEX_ALL <C: #define SQL_INDEX_ALL 1 >
SQL_INDEX_CLUSTERED <C: #define SQL_INDEX_CLUSTERED 1 >
SQL_INDEX_HASHED <C: #define SQL_INDEX_HASHED 2 >
SQL_INDEX_OTHER <C: #define SQL_INDEX_OTHER 3 >
SQL_INDEX_UNIQUE <C: #define SQL_INDEX_UNIQUE 0 >
SQL_INFO_DRIVER_START <C: #define SQL_INFO_DRIVER_START 1000 >
SQL_INFO_FIRST <C: #define SQL_INFO_FIRST 0 >
SQL_INFO_LAST <C: #define SQL_INFO_LAST SQL_QUALIFIER_LOCATION >
SQL_INTEGER <C: #define SQL_INTEGER 4 >
SQL_INTERVAL_DAY <C: #define SQL_INTERVAL_DAY (-83) >
SQL_INTERVAL_DAY_TO_HOUR <C: #define SQL_INTERVAL_DAY_TO_HOUR (-87) >
SQL_INTERVAL_DAY_TO_MINUTE <C: #define SQL_INTERVAL_DAY_TO_MINUTE (-88) >
SQL_INTERVAL_DAY_TO_SECOND <C: #define SQL_INTERVAL_DAY_TO_SECOND (-89) >
SQL_INTERVAL_HOUR <C: #define SQL_INTERVAL_HOUR (-84) >
SQL_INTERVAL_HOUR_TO_MINUTE <C: #define SQL_INTERVAL_HOUR_TO_MINUTE (-90) >
SQL_INTERVAL_HOUR_TO_SECOND <C: #define SQL_INTERVAL_HOUR_TO_SECOND (-91) >
SQL_INTERVAL_MINUTE <C: #define SQL_INTERVAL_MINUTE (-85) >
SQL_INTERVAL_MINUTE_TO_SECOND <C: #define SQL_INTERVAL_MINUTE_TO_SECOND (-92) >
SQL_INTERVAL_MONTH <C: #define SQL_INTERVAL_MONTH (-81) >
SQL_INTERVAL_SECOND <C: #define SQL_INTERVAL_SECOND (-86) >
SQL_INTERVAL_YEAR <C: #define SQL_INTERVAL_YEAR (-80) >
SQL_INTERVAL_YEAR_TO_MONTH <C: #define SQL_INTERVAL_YEAR_TO_MONTH (-82) >
SQL_INVALID_HANDLE <C: #define SQL_INVALID_HANDLE (-2) >
SQL_KEYSET_SIZE <C: #define SQL_KEYSET_SIZE 8 >
SQL_KEYSET_SIZE_DEFAULT <C: #define SQL_KEYSET_SIZE_DEFAULT 0L >
SQL_KEYWORDS <C: #define SQL_KEYWORDS 89 >
SQL_LCK_EXCLUSIVE <C: #define SQL_LCK_EXCLUSIVE 0x00000002 >
SQL_LCK_NO_CHANGE <C: #define SQL_LCK_NO_CHANGE 0x00000001 >
SQL_LCK_UNLOCK <C: #define SQL_LCK_UNLOCK 0x00000004 >
SQL_LEN_DATA_AT_EXEC_OFFSET <C: #define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) >
SQL_LIKE_ESCAPE_CLAUSE <C: #define SQL_LIKE_ESCAPE_CLAUSE 113 >
SQL_LIKE_ONLY <C: #define SQL_LIKE_ONLY 1 >
SQL_LOCK_EXCLUSIVE <C: #define SQL_LOCK_EXCLUSIVE 1 >
SQL_LOCK_NO_CHANGE <C: #define SQL_LOCK_NO_CHANGE 0 >
SQL_LOCK_TYPES <C: #define SQL_LOCK_TYPES 78 >
SQL_LOCK_UNLOCK <C: #define SQL_LOCK_UNLOCK 2 >
SQL_LOGIN_TIMEOUT <C: #define SQL_LOGIN_TIMEOUT 103 >
SQL_LOGIN_TIMEOUT_DEFAULT <C: #define SQL_LOGIN_TIMEOUT_DEFAULT 15L >
SQL_LONGVARBINARY <C: #define SQL_LONGVARBINARY (-4) >
SQL_LONGVARCHAR <C: #define SQL_LONGVARCHAR (-1) >
SQL_MAX_BINARY_LITERAL_LEN <C: #define SQL_MAX_BINARY_LITERAL_LEN 112 >
SQL_MAX_CHAR_LITERAL_LEN <C: #define SQL_MAX_CHAR_LITERAL_LEN 108 >
SQL_MAX_COLUMNS_IN_GROUP_BY <C: #define SQL_MAX_COLUMNS_IN_GROUP_BY 97 >
SQL_MAX_COLUMNS_IN_INDEX <C: #define SQL_MAX_COLUMNS_IN_INDEX 98 >
SQL_MAX_COLUMNS_IN_ORDER_BY <C: #define SQL_MAX_COLUMNS_IN_ORDER_BY 99 >
SQL_MAX_COLUMNS_IN_SELECT <C: #define SQL_MAX_COLUMNS_IN_SELECT 100 >
SQL_MAX_COLUMNS_IN_TABLE <C: #define SQL_MAX_COLUMNS_IN_TABLE 101 >
SQL_MAX_COLUMN_NAME_LEN <C: #define SQL_MAX_COLUMN_NAME_LEN 30 >
SQL_MAX_CURSOR_NAME_LEN <C: #define SQL_MAX_CURSOR_NAME_LEN 31 >
SQL_MAX_DSN_LENGTH <C: #define SQL_MAX_DSN_LENGTH 32 >
SQL_MAX_INDEX_SIZE <C: #define SQL_MAX_INDEX_SIZE 102 >
SQL_MAX_LENGTH <C: #define SQL_MAX_LENGTH 3 >
SQL_MAX_LENGTH_DEFAULT <C: #define SQL_MAX_LENGTH_DEFAULT 0L >
SQL_MAX_MESSAGE_LENGTH <C: #define SQL_MAX_MESSAGE_LENGTH 512 >
SQL_MAX_OPTION_STRING_LENGTH <C: #define SQL_MAX_OPTION_STRING_LENGTH 256 >
SQL_MAX_OWNER_NAME_LEN <C: #define SQL_MAX_OWNER_NAME_LEN 32 >
SQL_MAX_PROCEDURE_NAME_LEN <C: #define SQL_MAX_PROCEDURE_NAME_LEN 33 >
SQL_MAX_QUALIFIER_NAME_LEN <C: #define SQL_MAX_QUALIFIER_NAME_LEN 34 >
SQL_MAX_ROWS <C: #define SQL_MAX_ROWS 1 >
SQL_MAX_ROWS_DEFAULT <C: #define SQL_MAX_ROWS_DEFAULT 0L >
SQL_MAX_ROW_SIZE <C: #define SQL_MAX_ROW_SIZE 104 >
SQL_MAX_ROW_SIZE_INCLUDES_LONG <C: #define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103 >
SQL_MAX_STATEMENT_LEN <C: #define SQL_MAX_STATEMENT_LEN 105 >
SQL_MAX_TABLES_IN_SELECT <C: #define SQL_MAX_TABLES_IN_SELECT 106 >
SQL_MAX_TABLE_NAME_LEN <C: #define SQL_MAX_TABLE_NAME_LEN 35 >
SQL_MAX_USER_NAME_LEN <C: #define SQL_MAX_USER_NAME_LEN 107 >
SQL_MODE_DEFAULT <C: #define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE >
SQL_MODE_READ_ONLY <C: #define SQL_MODE_READ_ONLY 1L >
SQL_MODE_READ_WRITE <C: #define SQL_MODE_READ_WRITE 0L >
SQL_MULTIPLE_ACTIVE_TXN <C: #define SQL_MULTIPLE_ACTIVE_TXN 37 >
SQL_MULT_RESULT_SETS <C: #define SQL_MULT_RESULT_SETS 36 >
SQL_NC_END <C: #define SQL_NC_END 0x0004 >
SQL_NC_HIGH <C: #define SQL_NC_HIGH 0x0000 >
SQL_NC_LOW <C: #define SQL_NC_LOW 0x0001 >
SQL_NC_START <C: #define SQL_NC_START 0x0002 >
SQL_NEED_DATA <C: #define SQL_NEED_DATA 99 >
SQL_NEED_LONG_DATA_LEN <C: #define SQL_NEED_LONG_DATA_LEN 111 >
SQL_NNC_NON_NULL <C: #define SQL_NNC_NON_NULL 0x0001 >
SQL_NNC_NULL <C: #define SQL_NNC_NULL 0x0000 >
SQL_NON_NULLABLE_COLUMNS <C: #define SQL_NON_NULLABLE_COLUMNS 75 >
SQL_NOSCAN <C: #define SQL_NOSCAN 2 >
SQL_NOSCAN_DEFAULT <C: #define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF >
SQL_NOSCAN_OFF <C: #define SQL_NOSCAN_OFF 0L >
SQL_NOSCAN_ON <C: #define SQL_NOSCAN_ON 1L >
SQL_NO_DATA_FOUND <C: #define SQL_NO_DATA_FOUND 100 >
SQL_NO_NULLS <C: #define SQL_NO_NULLS 0 >
SQL_NO_TOTAL <C: #define SQL_NO_TOTAL (-4) >
SQL_NTS <C: #define SQL_NTS (-3) >
SQL_NULLABLE <C: #define SQL_NULLABLE 1 >
SQL_NULLABLE_UNKNOWN <C: #define SQL_NULLABLE_UNKNOWN 2 >
SQL_NULL_COLLATION <C: #define SQL_NULL_COLLATION 85 >
SQL_NULL_DATA <C: #define SQL_NULL_DATA (-1) >
SQL_NULL_HDBC <C: #define SQL_NULL_HDBC 0 >
SQL_NULL_HENV <C: #define SQL_NULL_HENV 0 >
SQL_NULL_HSTMT <C: #define SQL_NULL_HSTMT 0 >
SQL_NUMERIC <C: #define SQL_NUMERIC 2 >
SQL_NUMERIC_FUNCTIONS <C: #define SQL_NUMERIC_FUNCTIONS 49 >
SQL_NUM_EXTENSIONS <C: #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1) >
SQL_NUM_FUNCTIONS <C: #define SQL_NUM_FUNCTIONS 23 >
SQL_OAC_LEVEL1 <C: #define SQL_OAC_LEVEL1 0x0001 >
SQL_OAC_LEVEL2 <C: #define SQL_OAC_LEVEL2 0x0002 >
SQL_OAC_NONE <C: #define SQL_OAC_NONE 0x0000 >
SQL_ODBC_API_CONFORMANCE <C: #define SQL_ODBC_API_CONFORMANCE 9 >
SQL_ODBC_CURSORS <C: #define SQL_ODBC_CURSORS 110 >
SQL_ODBC_SAG_CLI_CONFORMANCE <C: #define SQL_ODBC_SAG_CLI_CONFORMANCE 12 >
SQL_ODBC_SQL_CONFORMANCE <C: #define SQL_ODBC_SQL_CONFORMANCE 15 >
SQL_ODBC_SQL_OPT_IEF <C: #define SQL_ODBC_SQL_OPT_IEF 73 >
SQL_ODBC_VER <C: #define SQL_ODBC_VER 10 >
SQL_OJ_ALL_COMPARISON_OPS <C: #define SQL_OJ_ALL_COMPARISON_OPS 0x00000040 >
SQL_OJ_CAPABILITIES <C: #define SQL_OJ_CAPABILITIES 65003 >
SQL_OJ_FULL <C: #define SQL_OJ_FULL 0x00000004 >
SQL_OJ_INNER <C: #define SQL_OJ_INNER 0x00000020 >
SQL_OJ_LEFT <C: #define SQL_OJ_LEFT 0x00000001 >
SQL_OJ_NESTED <C: #define SQL_OJ_NESTED 0x00000008 >
SQL_OJ_NOT_ORDERED <C: #define SQL_OJ_NOT_ORDERED 0x00000010 >
SQL_OJ_RIGHT <C: #define SQL_OJ_RIGHT 0x00000002 >
SQL_OPT_TRACE <C: #define SQL_OPT_TRACE 104 >
SQL_OPT_TRACEFILE <C: #define SQL_OPT_TRACEFILE 105 >
SQL_OPT_TRACE_DEFAULT <C: #define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF >
SQL_OPT_TRACE_FILE_DEFAULT <C: #define SQL_OPT_TRACE_FILE_DEFAULT "SQL.LOG" >
SQL_OPT_TRACE_OFF <C: #define SQL_OPT_TRACE_OFF 0L >
SQL_OPT_TRACE_ON <C: #define SQL_OPT_TRACE_ON 1L >
SQL_ORDER_BY_COLUMNS_IN_SELECT <C: #define SQL_ORDER_BY_COLUMNS_IN_SELECT 90 >
SQL_OSCC_COMPLIANT <C: #define SQL_OSCC_COMPLIANT 0x0001 >
SQL_OSCC_NOT_COMPLIANT <C: #define SQL_OSCC_NOT_COMPLIANT 0x0000 >
SQL_OSC_CORE <C: #define SQL_OSC_CORE 0x0001 >
SQL_OSC_EXTENDED <C: #define SQL_OSC_EXTENDED 0x0002 >
SQL_OSC_MINIMUM <C: #define SQL_OSC_MINIMUM 0x0000 >
SQL_OUTER_JOINS <C: #define SQL_OUTER_JOINS 38 >
SQL_OU_DML_STATEMENTS <C: #define SQL_OU_DML_STATEMENTS 0x00000001 >
SQL_OU_INDEX_DEFINITION <C: #define SQL_OU_INDEX_DEFINITION 0x00000008 >
SQL_OU_PRIVILEGE_DEFINITION <C: #define SQL_OU_PRIVILEGE_DEFINITION 0x00000010 >
SQL_OU_PROCEDURE_INVOCATION <C: #define SQL_OU_PROCEDURE_INVOCATION 0x00000002 >
SQL_OU_TABLE_DEFINITION <C: #define SQL_OU_TABLE_DEFINITION 0x00000004 >
SQL_OWNER_TERM <C: #define SQL_OWNER_TERM 39 >
SQL_OWNER_USAGE <C: #define SQL_OWNER_USAGE 91 >
SQL_PACKET_SIZE <C: #define SQL_PACKET_SIZE 112 >
SQL_PARAM_INPUT <C: #define SQL_PARAM_INPUT 1 >
SQL_PARAM_INPUT_OUTPUT <C: #define SQL_PARAM_INPUT_OUTPUT 2 >
SQL_PARAM_OUTPUT <C: #define SQL_PARAM_OUTPUT 4 >
SQL_PARAM_TYPE_DEFAULT <C: #define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT >
SQL_PARAM_TYPE_UNKNOWN <C: #define SQL_PARAM_TYPE_UNKNOWN 0 >
SQL_PC_NON_PSEUDO <C: #define SQL_PC_NON_PSEUDO SQL_PC_NOT_PSEUDO >
SQL_PC_NOT_PSEUDO <C: #define SQL_PC_NOT_PSEUDO 1 >
SQL_PC_PSEUDO <C: #define SQL_PC_PSEUDO 2 >
SQL_PC_UNKNOWN <C: #define SQL_PC_UNKNOWN 0 >
SQL_POSITION <C: #define SQL_POSITION 0 >
SQL_POSITIONED_STATEMENTS <C: #define SQL_POSITIONED_STATEMENTS 80 >
SQL_POS_ADD <C: #define SQL_POS_ADD 0x00000010 >
SQL_POS_DELETE <C: #define SQL_POS_DELETE 0x00000008 >
SQL_POS_OPERATIONS <C: #define SQL_POS_OPERATIONS 79 >
SQL_POS_POSITION <C: #define SQL_POS_POSITION 0x00000001 >
SQL_POS_REFRESH <C: #define SQL_POS_REFRESH 0x00000002 >
SQL_POS_UPDATE <C: #define SQL_POS_UPDATE 0x00000004 >
SQL_PROCEDURES <C: #define SQL_PROCEDURES 21 >
SQL_PROCEDURE_TERM <C: #define SQL_PROCEDURE_TERM 40 >
SQL_PS_POSITIONED_DELETE <C: #define SQL_PS_POSITIONED_DELETE 0x00000001 >
SQL_PS_POSITIONED_UPDATE <C: #define SQL_PS_POSITIONED_UPDATE 0x00000002 >
SQL_PS_SELECT_FOR_UPDATE <C: #define SQL_PS_SELECT_FOR_UPDATE 0x00000004 >
SQL_PT_FUNCTION <C: #define SQL_PT_FUNCTION 2 >
SQL_PT_PROCEDURE <C: #define SQL_PT_PROCEDURE 1 >
SQL_PT_UNKNOWN <C: #define SQL_PT_UNKNOWN 0 >
SQL_QL_END <C: #define SQL_QL_END 0x0002 >
SQL_QL_START <C: #define SQL_QL_START 0x0001 >
SQL_QUALIFIER_LOCATION <C: #define SQL_QUALIFIER_LOCATION 114 >
SQL_QUALIFIER_NAME_SEPARATOR <C: #define SQL_QUALIFIER_NAME_SEPARATOR 41 >
SQL_QUALIFIER_TERM <C: #define SQL_QUALIFIER_TERM 42 >
SQL_QUALIFIER_USAGE <C: #define SQL_QUALIFIER_USAGE 92 >
SQL_QUERY_TIMEOUT <C: #define SQL_QUERY_TIMEOUT 0 >
SQL_QUERY_TIMEOUT_DEFAULT <C: #define SQL_QUERY_TIMEOUT_DEFAULT 0L >
SQL_QUICK <C: #define SQL_QUICK 0 >
SQL_QUIET_MODE <C: #define SQL_QUIET_MODE 111 >
SQL_QUOTED_IDENTIFIER_CASE <C: #define SQL_QUOTED_IDENTIFIER_CASE 93 >
SQL_QU_DML_STATEMENTS <C: #define SQL_QU_DML_STATEMENTS 0x00000001 >
SQL_QU_INDEX_DEFINITION <C: #define SQL_QU_INDEX_DEFINITION 0x00000008 >
SQL_QU_PRIVILEGE_DEFINITION <C: #define SQL_QU_PRIVILEGE_DEFINITION 0x00000010 >
SQL_QU_PROCEDURE_INVOCATION <C: #define SQL_QU_PROCEDURE_INVOCATION 0x00000002 >
SQL_QU_TABLE_DEFINITION <C: #define SQL_QU_TABLE_DEFINITION 0x00000004 >
SQL_RD_DEFAULT <C: #define SQL_RD_DEFAULT SQL_RD_ON >
SQL_RD_OFF <C: #define SQL_RD_OFF 0L >
SQL_RD_ON <C: #define SQL_RD_ON 1L >
SQL_REAL <C: #define SQL_REAL 7 >
SQL_REFRESH <C: #define SQL_REFRESH 1 >
SQL_RESET_PARAMS <C: #define SQL_RESET_PARAMS 3 >
SQL_RESTRICT <C: #define SQL_RESTRICT 1 >
SQL_RESULT_COL <C: #define SQL_RESULT_COL 3 >
SQL_RETRIEVE_DATA <C: #define SQL_RETRIEVE_DATA 11 >
SQL_RETURN_VALUE <C: #define SQL_RETURN_VALUE 5 >
SQL_ROLLBACK <C: #define SQL_ROLLBACK 1 >
SQL_ROWSET_SIZE <C: #define SQL_ROWSET_SIZE 9 >
SQL_ROWSET_SIZE_DEFAULT <C: #define SQL_ROWSET_SIZE_DEFAULT 1L >
SQL_ROWVER <C: #define SQL_ROWVER 2 >
SQL_ROW_ADDED <C: #define SQL_ROW_ADDED 4 >
SQL_ROW_DELETED <C: #define SQL_ROW_DELETED 1 >
SQL_ROW_ERROR <C: #define SQL_ROW_ERROR 5 >
SQL_ROW_NOROW <C: #define SQL_ROW_NOROW 3 >
SQL_ROW_NUMBER <C: #define SQL_ROW_NUMBER 14 >
SQL_ROW_SUCCESS <C: #define SQL_ROW_SUCCESS 0 >
SQL_ROW_UPDATED <C: #define SQL_ROW_UPDATED 2 >
SQL_ROW_UPDATES <C: #define SQL_ROW_UPDATES 11 >
SQL_SCCO_LOCK <C: #define SQL_SCCO_LOCK 0x00000002 >
SQL_SCCO_OPT_ROWVER <C: #define SQL_SCCO_OPT_ROWVER 0x00000004 >
SQL_SCCO_OPT_TIMESTAMP <C: #define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER >
SQL_SCCO_OPT_VALUES <C: #define SQL_SCCO_OPT_VALUES 0x00000008 >
SQL_SCCO_READ_ONLY <C: #define SQL_SCCO_READ_ONLY 0x00000001 >
SQL_SCOPE_CURROW <C: #define SQL_SCOPE_CURROW 0 >
SQL_SCOPE_SESSION <C: #define SQL_SCOPE_SESSION 2 >
SQL_SCOPE_TRANSACTION <C: #define SQL_SCOPE_TRANSACTION 1 >
SQL_SCROLL_CONCURRENCY <C: #define SQL_SCROLL_CONCURRENCY 43 >
SQL_SCROLL_DYNAMIC <C: #define SQL_SCROLL_DYNAMIC (-2) >
SQL_SCROLL_FORWARD_ONLY <C: #define SQL_SCROLL_FORWARD_ONLY 0 >
SQL_SCROLL_KEYSET_DRIVEN <C: #define SQL_SCROLL_KEYSET_DRIVEN (-1) >
SQL_SCROLL_OPTIONS <C: #define SQL_SCROLL_OPTIONS 44 >
SQL_SCROLL_STATIC <C: #define SQL_SCROLL_STATIC (-3) >
SQL_SC_NON_UNIQUE <C: #define SQL_SC_NON_UNIQUE 0L >
SQL_SC_TRY_UNIQUE <C: #define SQL_SC_TRY_UNIQUE 1L >
SQL_SC_UNIQUE <C: #define SQL_SC_UNIQUE 2L >
SQL_SEARCHABLE <C: #define SQL_SEARCHABLE 3 >
SQL_SEARCH_PATTERN_ESCAPE <C: #define SQL_SEARCH_PATTERN_ESCAPE 14 >
SQL_SERVER_NAME <C: #define SQL_SERVER_NAME 13 >
SQL_SETPARAM_VALUE_MAX <C: #define SQL_SETPARAM_VALUE_MAX (-1) >
SQL_SET_NULL <C: #define SQL_SET_NULL 2 >
SQL_SIGNED_OFFSET <C: #define SQL_SIGNED_OFFSET (-20) >
SQL_SIMULATE_CURSOR <C: #define SQL_SIMULATE_CURSOR 10 >
SQL_SMALLINT <C: #define SQL_SMALLINT 5 >
SQL_SO_DYNAMIC <C: #define SQL_SO_DYNAMIC 0x00000004 >
SQL_SO_FORWARD_ONLY <C: #define SQL_SO_FORWARD_ONLY 0x00000001 >
SQL_SO_KEYSET_DRIVEN <C: #define SQL_SO_KEYSET_DRIVEN 0x00000002 >
SQL_SO_MIXED <C: #define SQL_SO_MIXED 0x00000008 >
SQL_SO_STATIC <C: #define SQL_SO_STATIC 0x00000010 >
SQL_SPECIAL_CHARACTERS <C: #define SQL_SPECIAL_CHARACTERS 94 >
SQL_SPEC_MAJOR <C: #define SQL_SPEC_MAJOR 2 >
SQL_SPEC_MINOR <C: #define SQL_SPEC_MINOR 10 >
SQL_SPEC_STRING <C: #define SQL_SPEC_STRING "02.10" >
SQL_SQLSTATE_SIZE <C: #define SQL_SQLSTATE_SIZE 5 >
SQL_SQ_COMPARISON <C: #define SQL_SQ_COMPARISON 0x00000001 >
SQL_SQ_CORRELATED_SUBQUERIES <C: #define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010 >
SQL_SQ_EXISTS <C: #define SQL_SQ_EXISTS 0x00000002 >
SQL_SQ_IN <C: #define SQL_SQ_IN 0x00000004 >
SQL_SQ_QUANTIFIED <C: #define SQL_SQ_QUANTIFIED 0x00000008 >
SQL_SS_ADDITIONS <C: #define SQL_SS_ADDITIONS 0x00000001 >
SQL_SS_DELETIONS <C: #define SQL_SS_DELETIONS 0x00000002 >
SQL_SS_UPDATES <C: #define SQL_SS_UPDATES 0x00000004 >
SQL_STATIC_SENSITIVITY <C: #define SQL_STATIC_SENSITIVITY 83 >
SQL_STILL_EXECUTING <C: #define SQL_STILL_EXECUTING 2 >
SQL_STMT_OPT_MAX <C: #define SQL_STMT_OPT_MAX SQL_ROW_NUMBER >
SQL_STMT_OPT_MIN <C: #define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT >
SQL_STRING_FUNCTIONS <C: #define SQL_STRING_FUNCTIONS 50 >
SQL_SUBQUERIES <C: #define SQL_SUBQUERIES 95 >
SQL_SUCCESS <C: #define SQL_SUCCESS 0 >
SQL_SUCCESS_WITH_INFO <C: #define SQL_SUCCESS_WITH_INFO 1 >
SQL_SYSTEM_FUNCTIONS <C: #define SQL_SYSTEM_FUNCTIONS 51 >
SQL_TABLE_STAT <C: #define SQL_TABLE_STAT 0 >
SQL_TABLE_TERM <C: #define SQL_TABLE_TERM 45 >
SQL_TC_ALL <C: #define SQL_TC_ALL 0x0002 >
SQL_TC_DDL_COMMIT <C: #define SQL_TC_DDL_COMMIT 0x0003 >
SQL_TC_DDL_IGNORE <C: #define SQL_TC_DDL_IGNORE 0x0004 >
SQL_TC_DML <C: #define SQL_TC_DML 0x0001 >
SQL_TC_NONE <C: #define SQL_TC_NONE 0x0000 >
SQL_TIME <C: #define SQL_TIME 10 >
SQL_TIMEDATE_ADD_INTERVALS <C: #define SQL_TIMEDATE_ADD_INTERVALS 109 >
SQL_TIMEDATE_DIFF_INTERVALS <C: #define SQL_TIMEDATE_DIFF_INTERVALS 110 >
SQL_TIMEDATE_FUNCTIONS <C: #define SQL_TIMEDATE_FUNCTIONS 52 >
SQL_TIMESTAMP <C: #define SQL_TIMESTAMP 11 >
SQL_TINYINT <C: #define SQL_TINYINT (-6) >
SQL_TRANSLATE_DLL <C: #define SQL_TRANSLATE_DLL 106 >
SQL_TRANSLATE_OPTION <C: #define SQL_TRANSLATE_OPTION 107 >
SQL_TXN_CAPABLE <C: #define SQL_TXN_CAPABLE 46 >
SQL_TXN_ISOLATION <C: #define SQL_TXN_ISOLATION 108 >
SQL_TXN_ISOLATION_OPTION <C: #define SQL_TXN_ISOLATION_OPTION 72 >
SQL_TXN_READ_COMMITTED <C: #define SQL_TXN_READ_COMMITTED 0x00000002 >
SQL_TXN_READ_UNCOMMITTED <C: #define SQL_TXN_READ_UNCOMMITTED 0x00000001 >
SQL_TXN_REPEATABLE_READ <C: #define SQL_TXN_REPEATABLE_READ 0x00000004 >
SQL_TXN_SERIALIZABLE <C: #define SQL_TXN_SERIALIZABLE 0x00000008 >
SQL_TXN_VERSIONING <C: #define SQL_TXN_VERSIONING 0x00000010 >
SQL_TYPE_DRIVER_END <C: #define SQL_TYPE_DRIVER_END SQL_UNICODE >
SQL_TYPE_DRIVER_START <C: #define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR >
SQL_TYPE_MAX <C: #define SQL_TYPE_MAX SQL_VARCHAR >
SQL_TYPE_MIN <C: #define SQL_TYPE_MIN SQL_BIT >
SQL_TYPE_NULL <C: #define SQL_TYPE_NULL 0 >
SQL_UB_DEFAULT <C: #define SQL_UB_DEFAULT SQL_UB_OFF >
SQL_UB_OFF <C: #define SQL_UB_OFF 0L >
SQL_UB_ON <C: #define SQL_UB_ON 1L >
SQL_UNBIND <C: #define SQL_UNBIND 2 >
SQL_UNICODE <C: #define SQL_UNICODE (-95) >
SQL_UNION <C: #define SQL_UNION 96 >
SQL_UNSEARCHABLE <C: #define SQL_UNSEARCHABLE 0 >
SQL_UNSIGNED_OFFSET <C: #define SQL_UNSIGNED_OFFSET (-22) >
SQL_UPDATE <C: #define SQL_UPDATE 2 >
SQL_USER_NAME <C: #define SQL_USER_NAME 47 >
SQL_USE_BOOKMARKS <C: #define SQL_USE_BOOKMARKS 12 >
SQL_U_UNION <C: #define SQL_U_UNION 0x00000001 >
SQL_U_UNION_ALL <C: #define SQL_U_UNION_ALL 0x00000002 >
SQL_VARBINARY <C: #define SQL_VARBINARY (-3) >
SQL_VARCHAR <C: #define SQL_VARCHAR 12 >
__DATE__ <C: #define __DATE__ "April 17, 1996" >
__FILE__ <C: #define __FILE__ >
__LINE__ <C: #define __LINE__ 0 >
__SQL <C: #define __SQL >
__SQLEXT <C: #define __SQLEXT >
__STDC__ <C: #define __STDC__ 1 >
__TIME__ <C: #define __TIME__ "8:51:38 pm" >
</methods> <methods> Database.ODBCCLINTInterface <category>macros</category>
SQL_ADD_RECORD: hstmt with: irow "#define SQL_ADD_RECORD(hstmt, irow) SQLSetPos(hstmt ,irow ,SQL_ADD,SQL_LOCK_NO_CHANGE)" ^self SQLSetPos: hstmt with: irow with: self SQL_ADD with: self SQL_LOCK_NO_CHANGE
SQL_DELETE_RECORD: hstmt with: irow "#define SQL_DELETE_RECORD(hstmt, irow) SQLSetPos(hstmt ,irow ,SQL_DELETE,SQL_LOCK_NO_CHANGE)" ^self SQLSetPos: hstmt with: irow with: self SQL_DELETE with: self SQL_LOCK_NO_CHANGE
SQL_LEN_DATA_AT_EXEC: length "#define SQL_LEN_DATA_AT_EXEC(length) (-length +SQL_LEN_DATA_AT_EXEC_OFFSET)" ^length negated + self SQL_LEN_DATA_AT_EXEC_OFFSET
SQL_LOCK_RECORD: hstmt with: irow with: fLock "#define SQL_LOCK_RECORD(hstmt, irow, fLock) SQLSetPos(hstmt ,irow ,SQL_POSITION,fLock )" ^self SQLSetPos: hstmt with: irow with: self SQL_POSITION with: fLock
SQL_POSITION_TO: hstmt with: irow "#define SQL_POSITION_TO(hstmt, irow) SQLSetPos(hstmt ,irow ,SQL_POSITION,SQL_LOCK_NO_CHANGE)" ^self SQLSetPos: hstmt with: irow with: self SQL_POSITION with: self SQL_LOCK_NO_CHANGE
SQL_REFRESH_RECORD: hstmt with: irow with: fLock "#define SQL_REFRESH_RECORD(hstmt, irow, fLock) SQLSetPos(hstmt ,irow ,SQL_REFRESH,fLock )" ^self SQLSetPos: hstmt with: irow with: self SQL_REFRESH with: fLock
SQL_UPDATE_RECORD: hstmt with: irow "#define SQL_UPDATE_RECORD(hstmt, irow) SQLSetPos(hstmt ,irow ,SQL_UPDATE,SQL_LOCK_NO_CHANGE)" ^self SQLSetPos: hstmt with: irow with: self SQL_UPDATE with: self SQL_LOCK_NO_CHANGE
</methods> <methods> Database.ODBCCLINTInterface class <category>class initialization</category>
deferredInitialize "Used to initialize the class after file-in or BOSS-in." "ODBCCLINTInterface deferredInitialize" | bufferClass | self initializeMaps. (bufferClass := self environment at: #ODBCBuffer ifAbsent: [ nil ]) notNil ifTrue: [ bufferClass install ]
initialize super initialize
initializeMaps "Modify the map to include additional definitions which are possible when on Windows." "ODBCCLINTInterface deferredInitialize" ^super initializeMaps.
</methods> <methods> Database.ODBCCLI95Interface class <category>class initialization</category>
initialize super initialize
</methods> <methods> Database.ODBCBuffer <category>binding</category>
bindForInput "Binding contents of the receiver to the server." fParamType := bufferSession class xif SQL_PARAM_INPUT. "We won't re-use pointers." (bufferPointer isNil) ifFalse: [ self free ]. self mallocUsingSelector: bufferSession class xif mallocSelector. self value: bufferValue. self bindInputExternal
bindForInputOutput "Binding contents of the receiver to the server." fParamType := bufferSession xif SQL_PARAM_INPUT_OUTPUT.
bindForOutput "Setup the receiver to hold the contents of a single column." fParamType := bufferSession class xif SQL_PARAM_OUTPUT. "We won't re-use pointers." (bufferPointer isNil) ifFalse: [ self free ]. "Allocate external CPointers." self mallocUsingSelector: bufferSession class xif mallocSelector. self bindOutputExternal
rebindForInput "Binding contents of the receiver to the server." self bindInputExternal.
</methods> <methods> Database.ODBCBuffer <category>private-data conversion {put}</category>
at: index putBoolean: aBoolean "Set the buffer to hold an encoded bit." pcbValue contents: 1. aBoolean ifTrue: [ bufferPointer at: index-1 put: 1 ] ifFalse: [ bufferPointer at: index-1 put: 0 ]. ^aBoolean
at: index putByteArray: aByteArray "Put aByteArray into the buffer." | bytes | (bytes := aByteArray size) > cbColDef ifTrue: [ self class connectionClass unableToBindSignal raise ]. bufferPointer copyAt: (index -1) from: aByteArray size: bytes startingAt: 1. pcbValue contents: bytes. ^aByteArray
at: index putDate: aDate "Put aDate into the buffer." "For performance reasons, the implementation of this method embeds knowledge of the structure of the Informix typedef DATE_STRUCT." | conversionBuffer | conversionBuffer := UninterpretedBytes new: 6. conversionBuffer shortAt: 1 put: aDate year. conversionBuffer unsignedShortAt: 3 put: aDate monthIndex. conversionBuffer unsignedShortAt: 5 put: aDate dayOfMonth. bufferPointer copyAt: (index -1) from: conversionBuffer size: 6 startingAt: 1. pcbValue contents: 6. ^aDate
at: index putDouble: aDouble "Put aDouble into the buffer" | conversionBuffer | conversionBuffer := UninterpretedBytes new: 8. conversionBuffer doubleAt: 1 put: aDouble. bufferPointer copyAt: (index -1) from: conversionBuffer size: 8 startingAt: 1. pcbValue contents: 8. ^aDouble
at: index putFixedPoint: aFixedPoint "Put aFixedPoint into the buffer." | strm str bytes | "Print an Informix-compatible version of aFixedPoint on strm. This involves dropping the trailing s of Smalltalk literal syntax. FixedPoint's never use exponent notation on output so no need to worry about the exponentCharacter being embedded." strm := (String new: 40) writeStream. aFixedPoint printOn: strm. strm skip: -1. str := strm contents. "Stick the result into the buffer." bufferPointer copyAt: (index -1) from: str size: (bytes := str size) startingAt: 1. pcbValue contents: bytes. ibScale := aFixedPoint scale. ^aFixedPoint
at: index putFloat: aFloat "Put aFloat into the buffer" | conversionBuffer | conversionBuffer := UninterpretedBytes new: 4. conversionBuffer floatAt: 1 put: aFloat. bufferPointer copyAt: (index -1) from: conversionBuffer size: 4 startingAt: 1. pcbValue contents: 4. ^aFloat
at: index putInteger: anInteger "Put anInteger into the buffer" | conversionBuffer | conversionBuffer := UninterpretedBytes new: 4. conversionBuffer longAt: 1 put: anInteger. bufferPointer copyAt: (index -1) from: conversionBuffer size: 4 startingAt: 1. pcbValue contents: 4. ^anInteger
at: index putLargeInteger: aLargeInteger "Put aLargeInteger into the buffer" | strm str bytes | "Print aLargeInteger on strm." strm := (String new: 24) writeStream. aLargeInteger printOn: strm. str := strm contents. "Stick the result into the buffer." bufferPointer copyAt: (index -1) from: str size: (bytes := str size) startingAt: 1. pcbValue contents: bytes. ^aLargeInteger
at: index putString: aString "Put aString into the buffer." | str bytes | str := aString asByteArrayEncoding: self encoding. bytes := str size. bytes > cbColDef ifTrue: [ self class connectionClass unableToBindSignal raise ]. bufferPointer copyAt: (index -1) from: str size: bytes startingAt: 1. pcbValue contents: bytes. ^aString
at: index putTime: aTime "Put aTime into the buffer" "For performance reasons, the implementation of this method embeds knowledge of the structure of the Informix typedef TIME_STRUCT." | conversionBuffer | conversionBuffer := UninterpretedBytes new: 6. conversionBuffer unsignedShortAt: 1 put: aTime hours. conversionBuffer unsignedShortAt: 3 put: aTime minutes. conversionBuffer unsignedShortAt: 5 put: aTime seconds. bufferPointer copyAt: (index -1) from: conversionBuffer size: 6 startingAt: 1. pcbValue contents: 6. ^aTime
at: index putTimestamp: aTimestamp "Put aTimestamp into the buffer" "For performance reasons, the implementation of this method embeds knowledge of the structure of the Informix typedef TIMESTAMP_STRUCT." | conversionBuffer | conversionBuffer := UninterpretedBytes new: 16. conversionBuffer shortAt: 1 put: (aTimestamp year max: 1). " max: 1 is for visigenics problem " conversionBuffer unsignedShortAt: 3 put: aTimestamp month. conversionBuffer unsignedShortAt: 5 put: aTimestamp day. conversionBuffer unsignedShortAt: 7 put: aTimestamp hour. conversionBuffer unsignedShortAt: 9 put: aTimestamp minute. conversionBuffer unsignedShortAt: 11 put: aTimestamp second. conversionBuffer unsignedLongAt: 13 put: aTimestamp millisecond * 1000000. bufferPointer copyAt: (index -1) from: conversionBuffer size: 16 startingAt: 1. pcbValue contents: 16. ^aTimestamp
at: index putWordArray: aWordArray "Put aWordArray into the buffer." | octets | aWordArray size > cbColDef ifTrue: [ self class connectionClass unableToBindSignal raise ]. bufferPointer copyAt: (index -1 ) from: aWordArray size: (octets := aWordArray basicSize) startingAt: 1. pcbValue contents: octets. ^aWordArray
</methods> <methods> Database.ODBCBuffer <category>private</category>
getSelector ^getSelector
pointerType "Answer the pointer type to use for buffer allocation." | refType | databaseType == #WordArray ifTrue: [ refType := CIntegerType unsignedShort ] ifFalse: [ refType := CIntegerType char ]. ^CArrayType defaultPointer referentType: refType; numElements: cbValueMax.
putSelector ^putSelector
</methods> <methods> Database.ODBCBuffer <category>private-data conversion {get}</category>
getBooleanAt: index "Answer a Boolean as described in the first byte pointed to by the buffer." ^(bufferPointer at: (index -1)) ~= 0
getByteArrayAt: index "Answer a ByteArray populated from the buffer." | bytes byteArray | bytes := pcbValue contents. byteArray := ByteArray new: bytes. bufferPointer copyAt: (index -1) to: byteArray size: bytes startingAt: 1. ^byteArray
getDateAt: index "Answer a Date populated from the buffer." "For performance reasons, the implementation of this method embeds knowledge of the structure of the Informix typedef DATE_STRUCT. Assume: bufferPointer points to at least 6 bytes in the heap." | conversionBuffer year month day | conversionBuffer := UninterpretedBytes new: 6. bufferPointer copyAt: (index -1) to: conversionBuffer size: 6 startingAt: 1. year := conversionBuffer shortAt: 1. month := conversionBuffer unsignedShortAt: 3. day := conversionBuffer unsignedShortAt: 5. ^Date newDay: day month: (Date nameOfMonth: month) year: year
getDoubleAt: index "Answer a Double populated from the buffer" "Assume: bufferPointer points to at least 8 bytes in the heap." | conversionBuffer | conversionBuffer := UninterpretedBytes new: 8. bufferPointer copyAt: (index -1) to: conversionBuffer size: 8 startingAt: 1. ^conversionBuffer doubleAt: 1
getFixedPointAt: index "Answer a FixedPoint number populated from the buffer" | bytes str | bytes := pcbValue contents. str := ByteString new: bytes. bufferPointer copyAt: (index -1) to: str size: bytes startingAt: 1. "Change E to e to help Fixedpoint conversion." str := str copyReplaceAll: 'E' with: 'e'. ^FixedPoint readFrom: str readStream
getFloatAt: index "Answer a Float populated from the buffer" "Assume: bufferPointer points to at least 4 bytes in the heap." | conversionBuffer | conversionBuffer := UninterpretedBytes new: 4. bufferPointer copyAt: (index -1) to: conversionBuffer size: 4 startingAt: 1. ^conversionBuffer floatAt: 1
getIntegerAt: index "Answer an Integer populated from the buffer." "Assume: bufferPointer points to at least 4 bytes in the heap." | conversionBuffer | conversionBuffer := UninterpretedBytes new: 4. bufferPointer copyAt: (index -1) to: conversionBuffer size: 4 startingAt: 1. ^conversionBuffer longAt: 1
getLargeIntegerAt: index "Answer a LargeInteger number populated from the buffer" | bytes str | bytes := pcbValue contents. str := ByteString new: bytes. bufferPointer copyAt: (index -1) to: str size: bytes startingAt: 1. ^Integer readFrom: str readStream
getStringAt: index "Answer a String populated from the buffer" | bytes byteArray | bytes := pcbValue contents. byteArray := ByteArray new: bytes. bufferPointer copyAt: (index -1) to: byteArray size: bytes startingAt: 1. ^byteArray asStringEncoding: self encoding
getTimeAt: index "Answer a Time populated from the buffer" "For performance reasons, the implementation of this method embeds knowledge of the structure of the Informix typedef TIME_STRUCT. Assume: bufferPointer points to at least 6 bytes in the heap" | conversionBuffer hours minutes seconds | conversionBuffer := UninterpretedBytes new: 6. bufferPointer copyAt: (index -1) to: conversionBuffer size: 6 startingAt: 1. hours := conversionBuffer unsignedShortAt: 1. minutes := conversionBuffer unsignedShortAt: 3. seconds := conversionBuffer unsignedShortAt: 5. ^Time new hours: hours minutes: minutes seconds: seconds
getTimestampAt: index "Answer a Timestamp populated from the buffer" "For performance reasons, the implementation of this method embeds knowledge of the structure of the Informix typedef TIMESTAMP_STRUCT. Assume: bufferPointer points to at least 16 bytes in the heap." | conversionBuffer year month day hours minutes seconds millisecond ts | conversionBuffer := UninterpretedBytes new: 16. bufferPointer copyAt: (index -1) to: conversionBuffer size: 16 startingAt: 1. year := conversionBuffer shortAt: 1. month := conversionBuffer unsignedShortAt: 3. day := conversionBuffer unsignedShortAt: 5. hours := conversionBuffer unsignedShortAt: 7. minutes := conversionBuffer unsignedShortAt: 9. seconds := conversionBuffer unsignedShortAt: 11. millisecond := ((conversionBuffer unsignedLongAt: 13) / 1000000) rounded. (ts := Timestamp new) year: year; month: month; day: day; hour: hours; minute: minutes; second: seconds; millisecond: millisecond. ^ts
getWordArrayAt: index "Answer a WordArray populated from the buffer." | bytes wa | bytes := pcbValue contents. wa := WordArray new: (bytes / 2). bufferPointer copyAt: (index -1) to: wa size: bytes startingAt: 1. ^wa
</methods> <methods> Database.ODBCBuffer <category>accessing</category>
cbColDef "Answer the precision of the buffer value" ^cbColDef
cbValueMax "Answer the receiver's maximum count (length) in bytes." ^cbValueMax
encoding "Answer the encoding" unicode ifTrue: [ ^self session unicodeEncoding ]. ^encoding
fCType "Answer the C data type for the data in this buffer." ^CTypeFromConversionMap at: databaseType
fParamType ^fParamType
fSqlType "Answer the Informix SQL data type for the data in this buffer." ^SQLTypeFromConversionMap at: databaseType
ibScale ^ibScale
iCol "Answer the receiver external bind index." ^bufferIndex
iCol: anInteger "Set the receiver external bind index." bufferIndex := anInteger.
pcbValue "Answer the receiver's count (length) in bytes pointer." ^pcbValue
rgbValue "Answer the receiver's buffer pointer." ^bufferPointer
unicode ^unicode
unicode: aBoolean unicode := aBoolean
</methods> <methods> Database.ODBCBuffer <category>allocation</category>
free "Free the receiver." bufferSession := nil. pcbValue notNil ifTrue: [ pcbValue freePointer. pcbValue := nil ]. super free.
mallocUsingSelector: mallocSelector "Allocate a physical buffer for the receiver. Use mallocSelector to perform the allocation." "Assume: the get and put methods will coerce the bufferPointer correctly." "Assert: mallocSelector is either #malloc: or #malloc16:" [ "Begin unwind protection." super mallocUsingSelector: mallocSelector. pcbValue := CIntegerType long perform: mallocSelector with: (count max: 1). "End unwind protection." ] ifCurtailed: [ self free ]
</methods> <methods> Database.ODBCBuffer <category>testing</category>
canHold: aValue "Can we re-use this buffer? Return true if this buffer has the correct type and is big enough to hold aValue." ^self databaseType == aValue odbcConversion ifFalse: [false] ifTrue: [(self isStringBased or: [self isArrayBased]) ifTrue: [ self isStringBased ifTrue: [ self cbValueMax >= (aValue asByteArrayEncoding: self encoding) size] ifFalse: [ self cbValueMax >= aValue size ] ] ifFalse: [true]]
isArrayBased ^#(#ByteArray #LargeByteArray) includes: self databaseType
isLargeObject ^false
isStringBased ^#(#String #LargeString) includes: self databaseType
</methods> <methods> Database.ODBCBuffer <category>private-accessing</category>
at: anIndex "Answer the object in the buffer at anIndex." ^(pcbValue contents == self class connectionClass xif SQL_NULL_DATA) ifTrue: [ nil ] ifFalse: [ self perform: getSelector with: anIndex ]
at: anIndex put: anObject "Store anObject into the buffer at anIndex." anObject isNil ifTrue: [ pcbValue contents: self class connectionClass xif SQL_NULL_DATA ] ifFalse:[ self perform: putSelector with: anIndex with: anObject ]. ^anObject
reUse: aValue "Re-use this buffer for an object of the same type, and same or smaller size. Update cbColDef (object size). Don't update maxColDef (bufferPointer memory size)." (self canHold: aValue) ifFalse: [self class connectionClass unableToBindSignal raise]. bufferValue := aValue. cbColDef := self isStringBased ifTrue: [ (ValuePrecisionBlocks at: databaseType) value: (aValue asByteArrayEncoding: self encoding) ] ifFalse: [ (ValuePrecisionBlocks at: databaseType) value: aValue]. self value: aValue. self rebindForInput
session "Answer the database session in which the receiver is being bound." ^bufferSession
session: anExternalDatabaseSession "Associate a database session which the receiver will use to bind itself." bufferSession := anExternalDatabaseSession.
</methods> <methods> Database.ODBCBuffer <category>private-binding</category>
bindForOutputParameter "Setup the receiver to hold the contents of return value and OUTPUT parameters of a stored procedure." fParamType := bufferSession class xif SQL_PARAM_OUTPUT. "We won't re-use pointers." (bufferPointer isNil) ifFalse: [ self free ]. "Allocate external CPointers." self mallocUsingSelector: bufferSession class xif mallocSelector. self bindInputExternal
bindInputExternal "Bind the contents of the receiver to the server." | rc xif sqlType cType | xif := bufferSession class xif. cType := self fCType. self isStringBased ifTrue: [ self unicode ifTrue: [ | type | type := self fSqlType. cType := xif SQL_C_WCHAR. type == xif SQL_CHAR ifTrue: [ sqlType := xif SQL_WCHAR ] ifFalse: [ type == xif SQL_VARCHAR ifTrue: [ sqlType := xif SQL_WVARCHAR ] ifFalse: [ sqlType := xif SQL_WLONGVARCHAR ] ] ] ifFalse: [ sqlType := self fSqlType ] ] ifFalse: [ sqlType := self fSqlType ]. ((bufferValue isNil) and: [ self session connection dbmsName = 'ACCESS' ]) ifTrue:[ databaseType := #Integer. cType := self fCType. sqlType := self fSqlType ]. rc := xif SQLBindParameter: bufferSession hstmt with: bufferIndex with: fParamType with: cType with: sqlType with: cbColDef with: self ibScale with: bufferPointer with: cbValueMax with: pcbValue. ( bufferSession traceLevel >= 3 ) ifTrue: [ (bufferSession traceStream) print: rc; nextPutAll: ' = SQLBindParameter( hstmt = '; nextPutAll: (bufferSession hstmt referentAddress printStringRadix: 16); nextPutAll: ', ipar='; print: bufferIndex; nextPutAll: ', fParamType='; print: fParamType; nextPutAll: ', fCType='; print: cType; nextPutAll: ', fSqlType='; print: sqlType; nextPutAll: ', cbParamDef= '; print: cbColDef; nextPutAll: ', ibScale= '; print: ibScale; nextPutAll: ', *rgbValue='; print: bufferValue; nextPutAll: ', cbValueMax='; print: cbValueMax; nextPutAll: ', *pcbValue='; print: pcbValue contents; nextPutAll: ' )'. bufferSession class trace: bufferSession emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := bufferSession getStatementErrors. ^bufferSession class connectionClass unableToBindSignal raiseWith: errs errorString: errs first dbmsErrorString ].
bindOutputExternal "Prepare the receiver to automatically receive it's data from the server." | rc xif cType | xif := bufferSession class xif. cType := self fCType. (self isStringBased and: [ self unicode ]) ifTrue: [ cType := xif SQL_C_WCHAR ]. rc := xif SQLBindCol: bufferSession hstmt with: bufferIndex with: cType with: bufferPointer with: cbValueMax with: pcbValue. ( bufferSession traceLevel >= 3 ) ifTrue: [ (bufferSession traceStream) print: rc; nextPutAll: ' = SQLBindCol( hstmt = '; nextPutAll: (bufferSession hstmt referentAddress printStringRadix: 16); nextPutAll: ', icol ='; print: bufferIndex; nextPutAll: ', fCType = '; print: self fCType; nextPutAll: ', rgbValue = '; nextPutAll: (bufferPointer referentAddress printStringRadix: 16); nextPutAll: ', cbValueMax = '; print: cbValueMax; nextPutAll: ', pcbValue = '; print: (pcbValue referentAddress printStringRadix: 16); nextPutAll: ' )'. bufferSession class trace: bufferSession emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := bufferSession getStatementErrors. ^bufferSession class connectionClass unableToBindSignal raiseWith: errs errorString: errs first dbmsErrorString ].
</methods> <methods> Database.ODBCBuffer <category>initialize-release</category>
descriptor: aColDesc position: position session: session "Initialize an instance of receiver which is set up to hold values as described." cbColDef := aColDesc precision. bufferIndex := position. bufferSession := session. self encoding: bufferSession encoding. count := 0. databaseType := aColDesc type. self unicode: (#(-8 -9 -10) includes: aColDesc fSqlType). cbValueMax := (FetchBufferSizeBlocks at: aColDesc type) value: aColDesc precision. self isStringBased ifTrue: [self unicode ifTrue: [ self encoding == #'UTF-8' ifTrue: [ cbValueMax := cbValueMax * 3. ] ifFalse: [ cbValueMax := cbValueMax * 2. ] ] ]. getSelector := GetSelectorMap at: databaseType ifAbsent: [nil]. putSelector := PutSelectorMap at: databaseType ifAbsent: [nil].
on: aValue position: position session: session "Initialize an instance of receiver which is set up to hold aValue." count := 0. ibScale := 0. bufferIndex := position. bufferSession := session. bufferValue := aValue. self encoding: bufferSession encoding. self unicode: session unicode. aValue isNil ifTrue: [ databaseType := #String. cbValueMax := 0. cbColDef := -1 ] ifFalse: [ databaseType := aValue odbcConversion. self isStringBased ifTrue: [ cbValueMax := (ValueSizeBlocks at: databaseType) value: (aValue asByteArrayEncoding: self encoding). cbColDef := (ValuePrecisionBlocks at: databaseType) value: (aValue asByteArrayEncoding: self encoding) ] ifFalse: [ cbValueMax := (ValueSizeBlocks at: databaseType) value: aValue. cbColDef := (ValuePrecisionBlocks at: databaseType) value: aValue ]. ]. getSelector := GetSelectorMap at: databaseType ifAbsent: [nil]. putSelector := PutSelectorMap at: databaseType ifAbsent: [nil].
</methods> <methods> Database.ODBCBuffer class <category>accessing</category>
connectionClass ^ODBCConnection
largeObjectBufferClass ^ODBCLargeObjectBuffer
</methods> <methods> Database.ODBCBuffer class <category>private-instance creation</category>
descriptor: aColDesc position: position session: session "Create an appropriate instance of an ODBCBuffer which is set up to hold values as described." ^(aColDesc isLong) ifTrue: [self largeObjectBufferClass basicNew descriptor: aColDesc position: position session: session] ifFalse: [self basicNew descriptor: aColDesc position: position session: session ].
on: aValue position: position session: session "Create an appropriate instance of an ODBCBuffer which is set up to hold values as described." ^(#(#LargeString #LargeByteArray #Stream) includes: aValue odbcConversion) ifTrue: [self largeObjectBufferClass basicNew on: aValue position: position session: session] ifFalse: [self basicNew on: aValue position: position session: session]
</methods> <methods> Database.ODBCBuffer class <category>class initialization</category>
initialize "ODBCBuffer initialize" self install
</methods> <methods> Database.ODBCBuffer class <category>private-activation</category>
install | ifcClass | (ifcClass := self connectionClass interfaceClass) notNil ifTrue: [ GetSelectorMap := ifcClass getSelectorMap. PutSelectorMap := ifcClass putSelectorMap. SQLTypeFromConversionMap := ifcClass fSqlTypeFromConversionMap. CTypeFromConversionMap := ifcClass fCTypeFromConversionMap. FetchBufferSizeBlocks := ifcClass fetchBufferSizeBlocks. ValueSizeBlocks := ifcClass valueSizeBlocks. ValuePrecisionBlocks := ifcClass valuePrecisionBlocks ].
</methods> <methods> Database.ODBCBuffer class <category>instance creation</category>
new ^self error: 'An ODBCBuffer is created and privately used by an instance of ODBCSession.'
</methods> <methods> Database.ODBCBuffer class <category>filein/fileout</category>
prerequisitesForLoading "The receiver requires ODBCConnection to have initialized its interface mapping before it initializes." ^super prerequisitesForLoading addLast: ODBCConnection; addLast: ODBCCLI95Interface; yourself
</methods> <methods> Database.ODBCLargeObjectBuffer <category>testing</category>
canHold: aValue "Return true if this buffer has the correct type. Since this is a large object buffer, the buffer has infinite capacity." ^self databaseType == aValue odbcConversion
isBLOB ^false
isCLOB ^false
isLargeObject ^true
</methods> <methods> Database.ODBCLargeObjectBuffer <category>binding</category>
bindForInput "Prepare the receiver to put data for an unbound parameter." fParamType := bufferSession class xif SQL_PARAM_INPUT. "We won't re-use pointers." (bufferPointer isNil) ifFalse:[ self free]. "Allocate CPointers to hold data and the size of the data " self mallocUsingSelector: bufferSession class xif mallocSelector. "For unbound buffers the data it represents is sent only when the server requests it. To facilitate this process we only bind the receiver's index so that the server can later specify which instance of the receiver that it wants data for." self at: 1 putInteger: bufferIndex. pcbValue contents: (bufferSession class xif SQL_DATA_AT_EXEC). ^self bindInputExternalBeforeTransfer
bindForOutput "Prepare the receiver to get data from an unbound result column." "We won't re-use pointers." (bufferPointer isNil) ifFalse: [ self free ]. "Allocate CPointers to hold data and the size of the data " self mallocUsingSelector: bufferSession class xif mallocSelector.
rebindForInput "Prepare the receiver to put data for an unbound parameter." "For unbound buffers the data it represents is sent only when the server requests it. To facilitate this process we only bind the receiver's index so that the server can later specify which instance of the receiver that it wants data for." self at: 1 putInteger: bufferIndex. pcbValue contents: (bufferSession class xif SQL_DATA_AT_EXEC). ^self bindInputExternalBeforeTransfer
</methods> <methods> Database.ODBCLargeObjectBuffer <category>accessing</category>
value "Answer the value (or values) held in the buffer" ^bufferValue copy
</methods> <methods> Database.ODBCLargeObjectBuffer <category>private</category>
coalesce: chunkCollection "This method converts the collection of segments held by chunkCollection into a single object, reassigned to bufferValue. Assumes very last segment of data is the smallest." | firstSegSize lastSegSize allocationSize copyIndex nSlots largeSegment | nSlots := chunkCollection size. firstSegSize := (chunkCollection at: 1) size. lastSegSize := (chunkCollection at: nSlots) size. "Create an appropriate object to hold combined chunks." allocationSize := (nSlots - 1) * firstSegSize + lastSegSize. largeSegment := (chunkCollection at: 1) species new: allocationSize. copyIndex := 0. chunkCollection do: [:segment | largeSegment replaceFrom: copyIndex + 1 to: copyIndex + segment size with: segment startingAt: 1. copyIndex := copyIndex + segment size]. bufferValue := largeSegment. ^bufferValue
</methods> <methods> Database.ODBCLargeObjectBuffer <category>private-data conversion {put}</category>
at: index putByteArray: aByteArray "Put aByteArray into the buffer." | bytes | (bytes := aByteArray size) > cbValueMax ifTrue: [ self class connectionClass unableToBindSignal raise ]. bufferPointer copyAt: (index -1) from: aByteArray size: bytes startingAt: 1. pcbValue contents: bytes. ^aByteArray
at: index putString: aString "Put aString into the buffer." | str bytes | str := aString asByteArrayEncoding: self encoding. (bytes := str size) > cbValueMax ifTrue: [ self class connectionClass unableToBindSignal raise ]. bufferPointer copyAt: (index -1) from: str size: bytes startingAt: 1. pcbValue contents: bytes. ^aString
</methods> <methods> Database.ODBCLargeObjectBuffer <category>private-binding</category>
bindInputExternal "Bind the contents of the receiver to the server." | rc xif valueStream | xif := bufferSession class xif. valueStream := ReadStream on: bufferValue. [valueStream atEnd ] whileFalse: [ "Ensure that proper conversion takes place." self at: 1 put: (valueStream nextAvailable: (bufferSession getDataChunkSize min: cbValueMax)). rc := xif SQLPutData: bufferSession hstmt with: bufferPointer with: pcbValue contents. (bufferSession traceLevel >= 3 ) ifTrue: [ (bufferSession traceStream) print: rc; nextPutAll: ' = SQLPutData( hstmt = '; nextPutAll: (bufferSession hstmt referentAddress printStringRadix: 16); nextPutAll: ', rgbValue = '; nextPutAll: (bufferPointer referentAddress printStringRadix: 16); nextPutAll: ', cbValue = '; print: pcbValue contents; nextPutAll: ' )'. bufferSession class trace: bufferSession emitTrace ]. (rc == xif SQL_ERROR or: [ rc == xif SQL_SUCCESS_WITH_INFO ]) ifTrue: [| errs | errs := bufferSession getStatementErrors. ^bufferSession class connectionClass unableToBindSignal raiseWith: errs errorString: errs first dbmsErrorString ] ]
bindInputExternalBeforeTransfer "Bind the contents of the receiver to the server." | rc xif sqlType cType | xif := bufferSession class xif. cType := self fCType. self isStringBased ifTrue: [ self unicode ifTrue: [ | type | type := self fSqlType. cType := xif SQL_C_WCHAR. type == xif SQL_CHAR ifTrue: [ sqlType := xif SQL_WCHAR ] ifFalse: [ type == xif SQL_VARCHAR ifTrue: [ sqlType := xif SQL_WVARCHAR ] ifFalse: [ sqlType := xif SQL_WLONGVARCHAR ] ] ] ifFalse: [ sqlType := self fSqlType ] ] ifFalse: [ sqlType := self fSqlType ]. ((bufferValue isNil) and: [ self session connection dbmsName = 'ACCESS' ]) ifTrue:[ databaseType := #Integer. cType := self fCType. sqlType := self fSqlType ]. rc := xif SQLSetParam: bufferSession hstmt with: bufferIndex with: cType with: sqlType with: cbColDef with: self ibScale with: bufferPointer with: pcbValue. ( bufferSession traceLevel >= 3 ) ifTrue: [ (bufferSession traceStream) print: rc; nextPutAll: ' = SQLSetParam( hstmt = '; nextPutAll: (bufferSession hstmt referentAddress printStringRadix: 16); nextPutAll: ', ipar='; print: bufferIndex; nextPutAll: ', fCType='; print: cType; nextPutAll: ', fSqlType='; print: sqlType; nextPutAll: ', cbParamDef= '; print: cbColDef; nextPutAll: ', ibScale= '; print: ibScale; nextPutAll: ', *rgbValue='; print: bufferValue; nextPutAll: ', *pcbValue='; print: pcbValue contents; nextPutAll: ' )'. bufferSession class trace: bufferSession emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := bufferSession getStatementErrors. ^bufferSession class connectionClass unableToBindSignal raiseWith: errs errorString: errs first dbmsErrorString ].
bindOutputExternal "Retrieve data from unbound result column. We only copy up to maxBytesToCopy" | rc xif copyIndex cType maxBytesToCopy cbValue chunkCollection nullTerm chunkSize isDone| xif := bufferSession class xif. copyIndex := 0. cType := self fCType. self isStringBased ifTrue: [ self unicode ifTrue: [ cType := xif SQL_C_WCHAR. self encoding == #'UTF-8' ifTrue: [ nullTerm := 3. ] ifFalse: [ nullTerm := 2. ]. ]ifFalse: [ nullTerm := 1. ] ]ifFalse:[ nullTerm := 0. ]. chunkCollection := OrderedCollection new: 0. maxBytesToCopy := (bufferSession getMaxLongData min: cbColDef ). isDone := false. [isDone] whileFalse: [ cbValue := ((maxBytesToCopy - copyIndex + nullTerm) min: cbValueMax). rc := xif SQLGetData: bufferSession hstmt with: bufferIndex with: cType with: bufferPointer with: cbValue with: pcbValue. (bufferSession traceLevel >= 3 ) ifTrue: [(bufferSession traceStream) print: rc; nextPutAll: ' = SQLGetData( hstmt = '; nextPutAll: (bufferSession hstmt referentAddress printStringRadix: 16); nextPutAll: ' )'. bufferSession class trace: bufferSession emitTrace ]. chunkSize := cbValue - nullTerm. ((rc == xif SQL_ERROR ) or: [ rc == xif SQL_SUCCESS_WITH_INFO ] ) ifTrue: [ | errs | errs := bufferSession getStatementErrors. (errs at: 1) sqlState = '01004' ifTrue: ["Data was truncated. Ensure that we don't copy more than maxBytesToCopy. Also, exclude null terminator for Strings for all but last chunk, which isn't null terminated." pcbValue contents: chunkSize] ifFalse: [ ^bufferSession class connectionClass unableToBindSignal raiseWith: errs errorString: errs first dbmsErrorString ] ]. ((rc == xif SQL_SUCCESS ) or: [ rc == xif SQL_NO_DATA_FOUND ]) ifTrue: ["All the data for the receiver has been received. There is no null terminator since this is a complete, final chunk. Ensure that we don't copy more than maxBytesToCopy." chunkSize := pcbValue contents. pcbValue contents: (maxBytesToCopy min: chunkSize). isDone := true. ] ifFalse: [ copyIndex := copyIndex + chunkSize. isDone := copyIndex >= maxBytesToCopy]. "Convert the data chunk to an appropriate object using superclass methods, and add it." chunkCollection add: super value]. chunkCollection size > 1 ifTrue: ["if more than one chunk, merge all the chunks into one large object" self coalesce: chunkCollection] ifFalse: [bufferValue := chunkCollection at: 1]
</methods> <methods> Database.ODBCLargeObjectBuffer <category>private-accessing</category>
reUse: aValue "Re-use this buffer for an object of the same type, and same or smaller size. Update cbColDef (object size). Don't update maxColDef (bufferPointer memory size)." (self canHold: aValue) ifFalse: [self class connectionClass unableToBindSignal raise]. bufferValue := aValue. cbColDef := self isStringBased ifTrue: [ (ValuePrecisionBlocks at: databaseType) value: (aValue asByteArrayEncoding: self encoding) ] ifFalse: [ (ValuePrecisionBlocks at: databaseType) value: aValue]. self rebindForInput
</methods> <methods> Database.ODBCLargeObjectBuffer <category>initialize-release</category>
on: aLargeObjectHolder position: position session: session "Initialize an instance of receiver which is set up to hold aValue." count := 0. ibScale := 0. databaseType := aLargeObjectHolder odbcConversion. bufferIndex := position. bufferSession := session. bufferValue := aLargeObjectHolder. self encoding: session encoding. self unicode: session unicode. self isStringBased ifTrue: [ cbValueMax := (ValueSizeBlocks at: databaseType) value: (aLargeObjectHolder asByteArrayEncoding: self encoding). cbColDef := (ValuePrecisionBlocks at: databaseType) value: (aLargeObjectHolder asByteArrayEncoding: self encoding) ] ifFalse: [ cbValueMax := (ValueSizeBlocks at: databaseType) value: aLargeObjectHolder. cbColDef := (ValuePrecisionBlocks at: databaseType) value: aLargeObjectHolder ]. getSelector := GetSelectorMap at: databaseType ifAbsent: [nil]. putSelector := PutSelectorMap at: databaseType ifAbsent: [nil].
</methods> <methods> Database.UnableToSetStatementOptions class <category>class initialization</category>
initialize "Set the default notification message for the receiver" self notifierString: (#errSetStatementOptions << #odbcDB >> 'unable to set the statement option').
</methods> <methods> Database.ODBCColumnDescription <category>accessing</category>
fSqlType "Return the receiver's SQL type" ^fSqlType
</methods> <methods> Database.ODBCColumnDescription <category>private-accessing</category>
fSqlType: aSmallInteger "Set the receiver's SQL type." fSqlType := aSmallInteger
</methods> <methods> Database.ODBCColumnDescription <category>testing</category>
isLong "Answer true if the receiver represents a long result column." | xif | xif := self class connectionClass xif. ^(fSqlType == xif SQL_LONGVARCHAR or: [ fSqlType == xif SQL_LONGVARBINARY]) or: [ fSqlType == xif SQL_WLONGVARCHAR]
</methods> <methods> Database.ODBCColumnDescription class <category>accessing</category>
connectionClass ^ODBCConnection
</methods> <methods> Database.ODBCDataSource <category>printing</category>
printOn: aStream super printOn: aStream. aStream nextPutAll: '( DSN ='; print: self name; nextPutAll: ', Description = '; print: self description; nextPutAll: ' )'
</methods> <methods> Database.ODBCDataSource <category>accessing</category>
description ^description
description: aString description := aString
name ^name
name: aString name := aString
</methods> <methods> Database.ODBCSession <category>private-accessing</category>
getStatementErrors "Return a collection of ODBCError(s) associated with the statement handle." | xif errors err | xif := self class xif. errors := OrderedCollection new. [ (err := self connection getErrorsExternal: xif SQL_NULL_HENV hdbc: xif SQL_NULL_HDBC hstmt: self hstmt) notNil ] whileTrue: [ errors add: err ]. "Many senders assume non-empty collection." errors isEmpty ifTrue: [err := self connection class defaultError. errors add: err]. ^errors
getStatementOption: fOptionTypeSymbol | ssoc | (connection supportsFunction: #SQL_API_SQLGETSTMTOPTION) ifFalse: [ self class connectionClass unsupportedDriverFunctionalitySignal raise ]. ^(ssoc := self sqlStatementOptionCache) at: fOptionTypeSymbol ifAbsent: [ | vOption | vOption := self getStatementOptionExternal: fOptionTypeSymbol. ssoc at: fOptionTypeSymbol put: vOption. vOption ].
hstmt ^hstmtHolder value
hstmt: aCPointerOrNil hstmtHolder value: aCPointerOrNil
hstmtHolder ^hstmtHolder
hstmtHolder: aValueHolder hstmtHolder := aValueHolder
mustResendQuery ^self mustResendQueryHolder value
mustResendQuery: aBoolean self mustResendQueryHolder value: aBoolean
mustResendQueryHolder ^mustResendQueryHolder
mustResendQueryHolder: aValueHolder mustResendQueryHolder := aValueHolder
resultsCache "Answer the contents of the result cache. Clear the cache." | results | results := resultsCache. resultsCache := nil. ^results
resultsCache: results "Cache results." resultsCache := results
setStatementOption: fOptionTypeSymbol value: vOption (connection supportsFunction: #SQL_API_SQLSETSTMTOPTION) ifFalse: [ self class connectionClass unsupportedDriverFunctionalitySignal raise ]. self setStatementOptionExternal: fOptionTypeSymbol value: vOption. self sqlStatementOptionCache at: fOptionTypeSymbol put: vOption. ^vOption
sqlStatementOptionCache ^sqlStatementOptionCache
sqlStatementOptionCache: anIdentityDictionary sqlStatementOptionCache := anIdentityDictionary
</methods> <methods> Database.ODBCSession <category>data processing</category>
bindVariable: aValue at: position "Bind a value to a parameter position in the query. Re-use an existing buffer only if it is big enough. An existing buffer can be too small if it holds a #String, but the new value is a #LargeString, for example." | buffer val | val := (aValue isKindOf: Stream) ifTrue: [aValue contents] ifFalse: [aValue]. buffer := self bindValuePointers at: position ifAbsent: [nil]. buffer isNil ifFalse: [(buffer canHold: val) ifFalse: [buffer free. buffer := nil]]. buffer isNil ifTrue: [buffer := self class bufferClass on: val position: position session: self. buffer bindForOutputParameter. self bindValuePointers at: position put: buffer] ifFalse: [buffer reUse: val]
bindVariableAt: position "Answer the value of a Stored Procedure variable." | buffer | buffer := self bindValuePointers at: position ifAbsent: [ self error: (#errUnboundVariable << #odbcDB >> 'unbound variable') ]. ^buffer value
cursorName "Answer the cursor name associated with receiver. If not supported, a nil is returned." | xif szCursor pcbCursor rc cursorName cbCursorMax | xif := self class xif. self hstmt isNil ifTrue: [ ^nil ]. [ "Begin unwind protection." cbCursorMax := self connection getInformationType: #SQL_MAX_CURSOR_NAME_LEN. szCursor := xif UCHAR perform: xif mallocSelector with: cbCursorMax. pcbCursor := xif SWORD perform: xif mallocSelector with: 1. rc := xif SQLGetCursorName: self hstmt with: szCursor with: cbCursorMax with: pcbCursor. ( traceLevel >= 2 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLGetCursorName( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', szCursor = '; print: szCursor copyCStringFromHeap; nextPutAll: ', cbCursorMax = '; print: cbCursorMax; nextPutAll: ', *pcbCursor = '; print: pcbCursor contents; nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getStatementErrors. (rc == xif SQL_ERROR and: [errs first sqlState = 'S1015']) ifTrue: [ ^nil ]. ^self class connectionClass externalDatabaseErrorSignal raiseWith: errs errorString: errs first dbmsErrorString ]. cursorName := szCursor copyCStringFromHeap. "End unwind protection" ] ensure: [ szCursor notNil ifTrue: [ szCursor freePointer ]. pcbCursor notNil ifTrue: [ pcbCursor freePointer ] ]. ^cursorName
cursorName: aString "Set the cursor name associated with receiver. If not supported, quietly do nothing." | xif szCursor rc bytes | xif := self class xif. self hstmt isNil ifTrue: [ ^nil ]. [ "Begin unwind protection." szCursor := (bytes := aString asByteArrayEncoding: self encoding) perform: xif copyToHeapSelector. rc := xif SQLSetCursorName: self hstmt with: szCursor with: bytes size. ( traceLevel >= 2 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLSetCursorName( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', *szCursor = '; print: aString; nextPutAll: ', cbCursor = '; print: bytes size; nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getStatementErrors. ^self class connectionClass externalDatabaseErrorSignal raiseWith: errs errorString: errs first dbmsErrorString ] "End unwind protection." ] ensure: [ szCursor notNil ifTrue: [ szCursor freePointer ] ]
execute "Execute the SQL statement." "Should we clean up after any previous work?" self isExecuting ifTrue: [ self cancel ]. ( self state == #prepared ) ifFalse: [ self class connectionClass invalidSessionStateSignal raise ]. [ "Begin unwind protection." queryIsPROC ifFalse: [ self bindExternal. ]. self state: #executing. self executeExternal. "End unwind protection." ] ifCurtailed: [ self state: #prepared ]
executeDirect: aString "Execute the prepared SQL statement without a prior external prepare step." self startPrepare. "Save the query, and prepare it for parameter binding." self setupQuery: aString. ( self state == #connected ) ifFalse: [ self class connectionClass invalidSessionStateSignal raise ]. [ "Begin unwind protection." self bindExternal. self state: #executing. self executeDirectExternal. "End unwind protection." ] ifCurtailed: [ self state: #connected ]
getDataChunkSize "Answer the data transfer size for LONGVARCHAR or LONGVARBINARY columns." ^self class xif getDataChunkSize
getMaxLongData "Answer the maximum amount of data to be copied from LONGVARCHAR or LONGVARBINARY columns." ^maxLongData
prepare: aString "Prepare a query string for processing. Use preparePROC: if calling a stored procedure." queryIsPROC := false. super prepare: aString
preparePROC: aString "Prepare a query which calls a stored procedure. A stored procedure can return multiple row sets and have input, output and return parameters." queryIsPROC := true. super prepare: aString
rowCount "Answer an Integer representing the number of rows affected by the previous query. Valid only after the query has been answered." | xif pcrow rc rowCount | xif := self class xif. self hstmt isNil ifTrue: [ ^nil ]. [ "Begin unwind protection." pcrow := xif SDWORD perform: xif mallocSelector with: 1. pcrow contents: 0. rc := xif SQLRowCount: self hstmt with: pcrow. rowCount := pcrow contents. ( traceLevel >= 2 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLRowCount( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', pcrow = '; nextPutAll: (pcrow referentAddress printStringRadix: 16); nextPutAll: ') = '; print: rowCount; nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getStatementErrors. ^self class connectionClass externalDatabaseErrorSignal raiseWith: errs errorString: errs first dbmsErrorString ] "End unwind protection." ] ensure: [ pcrow notNil ifTrue: [ pcrow freePointer ] ]. ^rowCount
setDataChunkSize: anInteger "Specify the data transfer size for LONGVARCHAR or LONGVARBINARY columns." self class xif setDataChunkSize: anInteger.
setMaxLongData: anInteger "Specify the maximum amount of data to be copied from LONGVARCHAR or LONGVARBINARY columns." maxLongData := (self class defaultMaxLongData min: anInteger).
</methods> <methods> Database.ODBCSession <category>private-finalization</category>
executor "Answer with an executor for the receiver." | ex | ex := super executor. ex hstmtHolder: self hstmtHolder. ex mustResendQueryHolder: self mustResendQueryHolder. ^ex
finalizeExternal "Release all external resources" self releaseBuffersAndAdaptors. self releaseBindings. (self hstmt isNil or: [self hstmt referentAddress isNil]) ifTrue: [ ^self ]. ( traceLevel >= 1 ) ifTrue: [ self class trace: nil ]. super finalizeExternal
key "The hstmtHolder is unique to the session and is constant across pause/resume." ^self hstmtHolder
</methods> <methods> Database.ODBCSession <category>private-binding</category>
bindExecutionParameters "Retrieve data-at-execution parameters and send them to the server." | position buffer | ["Retrieve cached data-at-execution parameter(ie unbound buffer) and tell it to send its data to the server." (position := self getParameterIndexExternal) notNil ] whileTrue: [ buffer := self bindValuePointers at: position ifAbsent: [^self class connectionClass unableToBindSignal raise]. buffer bindInputExternal ]
bindExternal "Bind values to parameters in the query, avoiding unnecessary rebinding where possible." "For each bind marker in the query fragments, get the corresponding value from the bindInput object. If the value isn't already bound, bind and remember it." | leftToRightIndex | leftToRightIndex := 1. 2 to: queryFragments size by: 2 do: [:index | | bindMarker value | bindMarker := queryFragments at: index. value := self inBindInputAt: bindMarker. "A bindMarker can be a symbol if the prepared SQL contained <:name>. Therefore we will have to manually specify a left-to-right index for our parameter positions. The same value can be used at different positions." self bindValue: value at: leftToRightIndex. (self boundValueAt: bindMarker is: value) ifFalse: [self bindValues at: bindMarker put: value]. leftToRightIndex := leftToRightIndex + 1]
bindValue: aValue at: position "Bind a value to a parameter position in the query. Re-use an existing buffer only if it is big enough. An existing buffer can be too small if it holds a #String, but the new value is a #LargeString, for example." | buffer val | val := (aValue isKindOf: Stream) ifTrue: [aValue contents] ifFalse: [aValue]. buffer := self bindValuePointers at: position ifAbsent: [nil]. buffer isNil ifFalse: [(buffer canHold: val) ifFalse: [buffer free. buffer := nil]]. buffer isNil ifTrue: [buffer := self class bufferClass on: val position: position session: self. buffer bindForInput. self bindValuePointers at: position put: buffer] ifFalse: [buffer reUse: val]
bindValuePointers "Answer with the receiver's dictionary of bound rgbValue pointers (input parameters)." bindValuePointers isNil ifTrue: [ bindValuePointers := IdentityDictionary new ]. ^bindValuePointers
prepareExternal "Prepare the server to execute a query." | xif sql sqlBa rc | xif := self class xif. "Assemble the query, substituting the correct parameter markers." queryFragments size == 1 ifTrue: [ sql := queryFragments at: 1 ] ifFalse: [ | sqlStream | sqlStream := (String new: query size) writeStream. sqlStream nextPutAll: (queryFragments at: 1). 2 to: queryFragments size by: 2 do: [ :index | sqlStream nextPut: $?; nextPutAll: (queryFragments at: index + 1) ]. sql := sqlStream contents ]. sqlBa := sql asByteArrayEncoding: self encoding. [ "Begin unwind protection." rc := xif SQLPrepare: self hstmt with: sqlBa with: sqlBa size. ( traceLevel >= 1 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLPrepare( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', szSqlStr = '''; print: sql asString; nextPutAll: ''', cbSqlStr = '; print: sql size; nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getStatementErrors. self class connectionClass unableToPrepareSignal raiseWith: errs errorString: errs first dbmsErrorString ]. "End unwind protection" ] ifCurtailed: [ self connection inTransactionMode ifFalse: [ self connection transactExternal: #SQL_ROLLBACK ] ]
releaseBindings bindValuePointers notNil ifTrue: [ | bvps hstmt | ((hstmt := self hstmt) isNil or: [hstmt referentAddress isNil]) ifFalse: [ self freeStatementExternal: #SQL_RESET_PARAMS ]. bvps := bindValuePointers values. 1 to: bvps size do: [ :i | | buffer | (buffer := bvps at: i) notNil ifTrue: [ buffer free ] ]. bindValuePointers := nil ]. super releaseBindings
</methods> <methods> Database.ODBCSession <category>private-execution</category>
acquireExternal "Acquire external resources." | xif phstmt rc | xif := self class xif. [ "Begin unwind protection." phstmt := xif HSTMT perform: xif mallocSelector with: 1. rc := xif SQLAllocStmt: self connection hdbc with: phstmt. ( traceLevel >= 3 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLAllocStmt( hdbc = '; nextPutAll: (self connection hdbc referentAddress printStringRadix: 16); nextPutAll: ', hstmt = '; nextPutAll: (phstmt contents referentAddress printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_SUCCESS) ifFalse: [ | errs | errs := self getStatementErrors. self class connectionClass unableToAllocateHandleSignal raiseWith: errs errorString: errs first dbmsErrorString ]. self hstmt: phstmt contents. "Determine if driver support feature.?" "End unwind protection." ] ensure: [ phstmt notNil ifTrue: [ phstmt freePointer ] ]
cancelExternal "Handle cleanup when current query is cancelled." ^self
cursorIsClosed "Receiver's cursor was closed and can no longer be used to access rows from the previous query. Prepared statements can be executed without preparing them again." "If receiver isn't in an executing state, nothing to do." self isExecuting ifFalse: [ ^self ]. "If there is an extant answer stream, it's dead so mark it as such." answerStream notNil ifTrue: [ answerStream session: nil. answerStream := nil ]. "We're now back in the prepared state and can execute again without preparing." self state: #prepared. ( traceLevel >= 3 ) ifTrue: [ (self traceStream) nextPutAll: 'hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); cr; tab; nextPutAll: 'self mustResendQuery: false. self state: #prepared'. self class trace: self emitTrace ]
cursorIsDeleted "Receiver's cursor was deleted and can no longer be used to access rows from the previous query. Any prepared statements must be prepared again. Parameters and bound buffers are still valid." "If receiver isn't in an executing state, nothing to do." self isExecuting ifFalse: [ ^self ]. "If there is an extant answer stream, it's dead so mark it as such." answerStream notNil ifTrue: [ answerStream session: nil. answerStream := nil ]. "The SQL text must be sent to the server again." self mustResendQuery: true. "We're now back in the prepared state and can execute again without preparing." self state: #prepared. ( traceLevel >= 3 ) ifTrue: [ (self traceStream) nextPutAll: 'hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); cr; tab; nextPutAll: 'self mustResendQuery: true. self state: #prepared'. self class trace: self emitTrace ]
dismissExternal self freeStatementExternal: #SQL_DROP. self hstmt: nil
executeDirectExternal "Execute the SQL text directly without preparing it first." | xif rc sql sqlBa | xif := self class xif. "Assemble the query, substituting the correct parameter markers." queryFragments size == 1 ifTrue: [ sql := queryFragments at: 1 ] ifFalse: [ | sqlStream | sqlStream := (String new: query size) writeStream. sqlStream nextPutAll: (queryFragments at: 1). 2 to: queryFragments size by: 2 do: [ :index | sqlStream nextPut: $?; nextPutAll: (queryFragments at: index + 1) ]. sql := sqlStream contents ]. sqlBa := sql asByteArrayEncoding: self encoding. rc := xif SQLExecDirect: self hstmt with: sqlBa with: sqlBa size. ( traceLevel >= 1 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLExecDirect:( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', szSqlStr = '''; print: sql asString; nextPutAll: ''', cbSqlStr = '; print: sql size; nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_ERROR) ifTrue: [ self resultsCache: self getStatementErrors ]. "Are there any data-at-execution parameters to bind?" (rc == xif SQL_NEED_DATA) ifTrue: [ self bindExecutionParameters ]
executeExternal "Execute the prepared SQL text." | xif rc | xif := self class xif. "Does the query text need to be sent to the server again?" self mustResendQuery ifTrue: [ self prepareExternal. self mustResendQuery: false ]. rc := xif SQLExecute: self hstmt. ( traceLevel >= 1 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLExecute( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_ERROR) ifTrue: [ self resultsCache: self getStatementErrors ]. "Are there any data-at-execution parameters to bind?" (rc == xif SQL_NEED_DATA) ifTrue: [ self bindExecutionParameters ]
freeStatementExternal: releaseOption "Release resources associated with a session." | xif rc | self hstmt isNil ifTrue: [ ^self ]. xif := self class xif. rc := xif SQLFreeStmt: self hstmt with: (xif perform: releaseOption). ( traceLevel >= 3 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLFreeStmt( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', '; print: releaseOption; nextPutAll: ')'. self class trace: self emitTrace ]. rc == xif SQL_SUCCESS ifFalse: [ | errs | errs := self getStatementErrors. self class connectionClass unableToFreeResourceSignal raiseRequestWith: errs errorString: errs first dbmsErrorString ].
getParameterIndexExternal "Retrieve index of data-at-execution parameter." | xif rc prgbValue rgbValue paramIndex | xif := self class xif. ["Begin unwind protection" prgbValue := xif PSDWORD perform: xif mallocSelector with: 1. rc := xif SQLParamData: self hstmt with: prgbValue. (traceLevel >= 3) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLParamData( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', prgbValue= '; nextPutAll: (prgbValue referentAddress printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_ERROR) ifTrue: [| errs | errs := self getStatementErrors. ^self class connectionClass unableToBindSignal raiseWith: errs errorString: errs first dbmsErrorString ]. ((rc == xif SQL_SUCCESS) or: [ rc == xif SQL_SUCCESS_WITH_INFO]) ifTrue: [ ^nil ]. (rc == xif SQL_NEED_DATA) ifTrue: [ rgbValue := prgbValue contents. paramIndex := rgbValue contents]. ^paramIndex "End unwind protection"] ensure: [ prgbValue notNil ifTrue:[ prgbValue freePointer]].
getStatementOptionExternal: fOptionSymbol "Answer the information associated with fInfoTypeSymbol. This information is defined only after connecting." | xif rc ub pvParam vParam | xif := self class xif. [ "Begin unwind protection." pvParam := xif PTR perform: xif mallocSelector with: 1. rc := xif SQLGetStmtOption: self hstmt with:(xif perform: fOptionSymbol) with: pvParam. (rc == xif SQL_SUCCESS or: [ rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getStatementErrors. ^self class unableToQueryStatementOptionsSignal raiseWith: errs errorString: errs first dbmsErrorString ]. ub := UninterpretedBytes new: pvParam contents. vParam := ub perform: (SQLStatementOptionConversionMap at: fOptionSymbol) with: 1 "End unwind protection." ] ensure: [ pvParam notNil ifTrue: [ pvParam freePointer ]]. ^vParam
installExternal super installExternal. self hstmt: nil. self mustResendQuery: false. self sqlStatementOptionCache: IdentityDictionary new. self setMaxLongData: DefaultMaxLongData.
moreResultsExternal "Return true if there are more results." | xif rc hasMoreResults | xif := self class xif. rc := xif SQLMoreResults: self hstmt. traceLevel >= 1 ifTrue: [(self traceStream) print: rc; nextPutAll: ' = SQLMoreResults( hstmt = '; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace]. hasMoreResults := rc == xif SQL_NO_DATA_FOUND ifTrue: [false] ifFalse: [rc == xif SQL_ERROR ifTrue: [self resultsCache: self getStatementErrors. false] ifFalse: [true]]. hasMoreResults ifFalse: ["These two lines executed after all answer streams retrieved." self freeStatementExternal: #SQL_CLOSE. self handleAutoCommit]. ^hasMoreResults
readyExternal ^true
resultsExternal | errs sqlState | (errs := self resultsCache) notNil ifTrue: [ 1 to: errs size do: [ :position| ((sqlState := (errs at: position) sqlState asSymbol) == #'01000' or: [ sqlState == #'S1000' ]) ifFalse: [ ^self class connectionClass unableToExecuteSQLSignal raiseWith: errs errorString: (errs at: position) dbmsErrorString ] ]. self class connectionClass externalDatabaseInformationSignal raiseRequestWith: errs. ]. ^true
setStatementOptionExternal: fOptionSymbol value: vOption "Set the information associated with fInfoTypeSymbol. This information is defined only after connecting." | xif rc | xif := self class xif. rc := xif SQLSetStmtOption: self hstmt with: (xif perform: fOptionSymbol) with: vOption. (rc == xif SQL_SUCCESS or: [ rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getStatementErrors. ^self class unableToSetStatementOptionsSignal raiseWith: errs errorString: errs first dbmsErrorString ]. ^vOption
</methods> <methods> Database.ODBCSession <category>private-answer set</category>
advanceExternal "Advance to the next row. If now more rows, answer nil." | xif rc | xif := self class xif. rc := xif SQLFetch: self hstmt. (traceLevel >= 3) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLFetch( hstmt='; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ' )'. self class trace: self emitTrace ]. (rc == xif SQL_NO_DATA_FOUND) ifTrue: [ ^nil ]. (rc == xif SQL_SUCCESS or: [rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getStatementErrors. self class connectionClass unableToFetchDataSignal raiseWith: errs errorString: errs first dbmsErrorString ].
allocateRowBufferExternal: aColumn "Answer an odbc buffer allocated for holding one column's worth of information as returned by the ODBC CLI. An appropriate buffer class for the result column will be choosen automatically." | aColDescription bufferClass buffer | aColDescription := columnDescriptions at: aColumn. bufferClass := (self isAnswerColumnBound: aColumn) ifTrue: [self class bufferClass] ifFalse: [self class largeObjectBufferClass]. buffer := bufferClass descriptor: aColDescription position: aColumn session: self. buffer bindForOutput. ^buffer
cancelAnswerSetExternal "Cancel current answer set from the server." | stateTemp | stateTemp := self state. (stateTemp == #new or: [stateTemp == #paused or: [self hstmt isNil]]) ifTrue: [^self]. self freeStatementExternal: #SQL_CLOSE. self handleAutoCommit
describeAnswerColumns "Fill in the columnDescriptions array." | xif descrs cbColNameMax columnDescriptionClass szColName pcbColName pfSqlType pcbColDef pibScale pfNullable rc precision colDesc | xif := self class xif. descrs := Array new: self numColumns. cbColNameMax := self connection getInformationType: #SQL_MAX_COLUMN_NAME_LEN. columnDescriptionClass := self connection class columnDescriptionClass. [ "Begin unwind protection." szColName := xif UCHAR perform: xif mallocSelector with: cbColNameMax. pcbColName := xif SWORD perform: xif mallocSelector with: 1. pfSqlType := xif SWORD perform: xif mallocSelector with: 1. pcbColDef := xif UDWORD perform: xif mallocSelector with: 1. pibScale := xif SWORD perform: xif mallocSelector with: 1. pfNullable := xif SWORD perform: xif mallocSelector with: 1. 1 to: self numColumns do: [ :aColumn | rc := xif SQLDescribeCol: self hstmt with: aColumn with: szColName with: cbColNameMax with: pcbColName with: pfSqlType with: pcbColDef with: pibScale with: pfNullable. precision := pcbColDef contents. ( traceLevel >= 2) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLDescribeCol( hstmt='; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', icol ='; print: aColumn; nextPutAll: ', szColName: '; print: szColName copyCStringFromHeap; nextPutAll: ', cbColName: '; print: pcbColName contents; nextPutAll: ', fSQLType: '; print: pfSqlType contents; nextPutAll: ', cbColDef: '; print: precision; nextPutAll: ', ibScale: '; print: pibScale contents; nextPutAll: ', fNullable: '; print: pfNullable contents; nextPutAll: ' )'. self class trace: self emitTrace ]. ( rc == xif SQL_SUCCESS or: [ rc == xif SQL_SUCCESS_WITH_INFO] ) ifFalse: [ | errs | errs := self getStatementErrors. ^self class connectionClass unableToDescribeSignal raiseWith: errs errorString: errs first dbmsErrorString ]. (colDesc := columnDescriptionClass new) index: aColumn; name: szColName copyCStringFromHeap; fSqlType: pfSqlType contents; type: (xif class fSqlTypeToConversionMap at: colDesc fSqlType); maxColumnConstraint: precision; precision: precision; scale: pibScale contents; nullable: (pfNullable contents == xif SQL_NULLABLE). descrs at: aColumn put: colDesc ] "End unwind protection." ] ensure: [ szColName notNil ifTrue: [ szColName freePointer ]. pcbColName notNil ifTrue: [ pcbColName freePointer ]. pfSqlType notNil ifTrue: [ pfSqlType freePointer ]. pcbColDef notNil ifTrue: [ pcbColDef freePointer ]. pibScale notNil ifTrue: [ pibScale freePointer ]. pfNullable notNil ifTrue: [ pfNullable freePointer ] ]. self columnDescriptions: descrs
getColumnDescriptionExternal: aColumn "Folded into describeAnswerColumns for efficiency." ^self shouldNotImplement
getFieldExternal: aColumn | buffer | buffer := (self rowBuffers) at: aColumn. "If it is an ODBCLargeObjectBuffer, then we must retrieve the data now." buffer isLargeObject ifTrue: [buffer bindOutputExternal]. ^buffer value
handleAutoCommit "The behavior of the EXDI as regards transactions is that each statement executed is a separate transaction unless the connection is sent begin." | conn xif | conn := self connection. xif := self class xif. conn inTransactionMode ifFalse: [ "We have an autocommit if connection wasn't sent begin" | behavior | behavior := conn getInformationType: #SQL_CURSOR_COMMIT_BEHAVIOR. behavior == xif SQL_CB_CLOSE ifTrue: [conn cursorsAreClosed]]
hasAnswerSetExternal | xif rc pccol | xif := self class xif. self numColumns: 0. "default to none" [ "Begin unwind protection." pccol := xif SWORD perform: xif mallocSelector with: 1. rc := xif SQLNumResultCols: self hstmt with: pccol. ( traceLevel >= 3 ) ifTrue: [ (self traceStream) print: rc; nextPutAll: ' = SQLNumResultCols( hstmt='; nextPutAll: (self hstmt referentAddress printStringRadix: 16); nextPutAll: ', *pccol ='; print: pccol contents; nextPutAll: ' )'. self class trace: self emitTrace ]. rc == xif SQL_SUCCESS ifFalse: [ | errs | errs := self getStatementErrors. ^self class connectionClass unableToFetchDataSignal raiseWith: errs errorString: errs first dbmsErrorString ]. self numColumns: pccol contents. "End unwind protection." ] ensure: [ pccol notNil ifTrue: [ pccol freePointer ] ]. self numColumns > 0 ifTrue: [ ^true ]. "Simulate auto-commit transaction behavior?" self handleAutoCommit. ^false
isAnswerColumnBound: aColumn "If the data source does not support the retrieval of long result columns in any order then conditionally use unbound buffers to retreive result columns. So, a buffer is bound unless: (a) it is Long, or (b) our ODBC driver is 'order-limited' AND any preceeding column is Long. In case (b), if long result columns exist and do not occur at the end then conditionally bind result columns up to the first long result column. Thereafter all columns will be unbound whether or not they represent long results." | prevLongCol isBound | self canFetchLongResultsAnyOrder ifTrue: [isBound := (columnDescriptions at: aColumn) isLong not] ifFalse: [prevLongCol := columnDescriptions detect: [:each | ((each index) <= aColumn) and: [each isLong]] ifNone: [nil]. isBound := prevLongCol isNil]. ^isBound
releaseBuffers "Release buffers and their associated resources." | rbs | (rbs := self rowBuffers) notNil ifTrue: [ | hstmt | ((hstmt := self hstmt) isNil or: [hstmt referentAddress isNil]) ifFalse: [ self freeStatementExternal: #SQL_UNBIND ]. 1 to: rbs size do: [ :i | (rbs at: i) free ] ]. super releaseBuffers
</methods> <methods> Database.ODBCSession <category>private-tracing</category>
traceLevel ^traceLevel
</methods> <methods> Database.ODBCSession <category>printing</category>
printOn: aStream | hstmt | super printOn: aStream. ((hstmt := self hstmt) isNil or: [ hstmt referentAddress isNil ] ) ifFalse: [ aStream nextPutAll: '( hstmt = '; nextPutAll: (hstmt referentAddress printStringRadix: 16); nextPutAll: ' )' ]
</methods> <methods> Database.ODBCSession <category>private-testing</category>
canFetchLongResultsAnyOrder "Answer aBoolean indicating whether or not long results can be fetched in any order" fetchLongResultsAnyOrder isNil ifTrue:[ | getDataMask xif | xif := self class xif. getDataMask := connection getInformationType: #SQL_GETDATA_EXTENSIONS. fetchLongResultsAnyOrder := (((getDataMask bitAnd: xif SQL_GD_ANY_COLUMN) == 1) and: [((getDataMask bitAnd: xif SQL_GD_ANY_ORDER) == 1)])]. ^fetchLongResultsAnyOrder
</methods> <methods> Database.ODBCSession <category>accessing</category>
encoding encoding isNil ifTrue: [ encoding := self connection encoding ]. ^encoding
encoding: anEncoding encoding := anEncoding
unicode ^unicode
unicode: aBoolean unicode := aBoolean
unicodeEncoding unicodeEncoding isNil ifTrue: [ unicodeEncoding := self connection unicodeEncoding ]. ^unicodeEncoding
unicodeEncoding: anEncoding unicodeEncoding := anEncoding
</methods> <methods> Database.ODBCSession <category>catalog functions</category>
getSQLColumns: tableQualifier tableOwner: tableOwner tableName: tableName columnName: columnName "If supported on the current platform, call the ODBC function SQLColumns to obtain a list of names of tables stored in the current data source. Sending the message callSQLColumns:tableOwner:tableName:columnName: is equivalent to preparing and executing a query using the receiver. After the call completes, the table information is obtained as an answer stream in the normal way (i.e. send the message answer and then use the answer stream to fetch the rows). Each row is an Array with one element for each column. The columns of the answer set are defined in the ODBC documentation as: TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, TYPE_NAME, PRECISION, LENGTH, SCALE, RADIX, NULLABLE, and REMARKS. Refer to the Informix CLI or ODBC documentation for more details. The arguments tableQualifier, tableOwner, tableName, and columnName are directly passed to the function and take their definitions from the function definition." | xif szTableQualfier szTableOwner szTableName szColumnName rc | xif := self class xif. "Check first that the driver supports functionality." (connection supportsFunction: #SQL_API_SQLCOLUMNS) ifFalse: [ self class connectionClass unsupportedDriverFunctionalitySignal raise ]. self startPrepare. self state: #executing. [ "Begin unwind protection." | tqByteArray toByteArray tnByteArray cnByteArray | szTableQualfier := szTableOwner := szTableName := szColumnName := nil. tableQualifier isNil ifFalse: [ tqByteArray := tableQualifier asByteArrayEncoding: self encoding. szTableQualfier := tqByteArray perform: xif copyToHeapSelector ]. tableOwner isNil ifFalse: [ toByteArray := tableOwner asByteArrayEncoding: self connection encoding. szTableOwner := toByteArray perform: xif copyToHeapSelector ]. tableName isNil ifFalse: [ tnByteArray := tableName asByteArrayEncoding: self connection encoding. szTableName := tnByteArray perform: xif copyToHeapSelector ]. columnName isNil ifFalse: [ cnByteArray := columnName asByteArrayEncoding: self connection encoding. szColumnName := cnByteArray perform: xif copyToHeapSelector ]. rc := xif SQLColumns: self hstmt with: szTableQualfier with: tqByteArray size with: szTableOwner with: toByteArray size with: szTableName with: tnByteArray size with: szColumnName with: cnByteArray size. (rc == xif SQL_SUCCESS or: [rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getStatementErrors. self resultsCache: errs ]. "End unwind protection." ] ensure: [ szTableQualfier notNil ifTrue: [ szTableQualfier freePointer ]. szTableOwner notNil ifTrue: [ szTableOwner freePointer ]. szTableName notNil ifTrue: [ szTableName freePointer ]. szColumnName notNil ifTrue: [ szColumnName freePointer ] ]
getSQLSpecialColumns: colTypeSymbol tableQualifier: tableQualifier tableOwner: tableOwner tableName: tableName scope: scopeSymbol nullable: nullableSymbol "If supported on the current platform, call the ODBC function SQLSpecialColumns to obtain a list of statistics about a single table and the indexes associated with the table. Sending the message callSQLSpecialColumns:tableQualifier:tableOwner:tableName:scope:nullable: is equivalent to preparing and executing a query using the receiver. After the call completes, the table information is obtained as an answer stream in the normal way (i.e. send the message answer and then use the answer stream to fetch the rows). Each row is an Array with one element for each column. The columns of the answer set are defined in the ODBC documentation as: SCOPE, COLUMN_NAME, DATA_TYPE, PRECISION, LENGTH, SCALE, and PSEUDO_COLUMN. Refer to the Informix CLI or ODBC documentation for more details. The arguments tableQualifier, tableOwner, and tableName are directly passed to the function and take their definitions from the function definition. The argument colTypeSymbol must be either #SQL_BEST_ROWID or #SQL_ROWVER. The argument scopeSymbol must be one of #SQL_SCOPE_CURROW, #SQL_SCOPE_TRANSACTION, #SQL_SCOPE_SESSION. The argument nullableSymbol must be either #SQL_NO_NULLS or #SQL_NULLABLE." | xif fColType szTableQualfier szTableOwner szTableName fScope fNullable rc | xif := self class xif. "Check first that the driver supports functionality." (connection supportsFunction: #SQL_API_SQLSPECIALCOLUMNS) ifFalse: [ self class connectionClass unsupportedDriverFunctionalitySignal raise ]. self startPrepare. self state: #executing. "Set up the fColType parameter. colTypeSymbol must be one of #SQL_BEST_ROWID or #SQL_ROWVER." fColType := xif perform: colTypeSymbol. "Set up the fScope parameter. scopeSymbol must be one of #SQL_SCOPE_CURROW, #SQL_SCOPE_TRANSACTION, #SQL_SCOPE_SESSION" fScope := xif perform: scopeSymbol. "Set up the fNullable parameter. nullableSymbol must be one of #SQL_NO_NULLS or #SQL_NULLABLE." fNullable := xif perform: nullableSymbol. [ "Begin unwind protection." | tqByteArray toByteArray tnByteArray | szTableQualfier := szTableOwner := szTableName := nil. tableQualifier isNil ifFalse: [ tqByteArray := tableQualifier asByteArrayEncoding: self encoding. szTableQualfier := tqByteArray perform: xif copyToHeapSelector ]. tableOwner isNil ifFalse: [ toByteArray := tableOwner asByteArrayEncoding: self connection encoding. szTableOwner := toByteArray perform: xif copyToHeapSelector ]. tableName isNil ifFalse: [ tnByteArray := tableName asByteArrayEncoding: self connection encoding. szTableName := tnByteArray perform: xif copyToHeapSelector ]. rc := xif SQLSpecialColumns: self hstmt with: fColType with: szTableQualfier with: tqByteArray size with: szTableOwner with: toByteArray size with: szTableName with: tnByteArray size with: fScope with: fNullable. (rc == xif SQL_SUCCESS or: [rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getStatementErrors. self resultsCache: errs ]. "End unwind protection." ] ensure: [ szTableQualfier notNil ifTrue: [ szTableQualfier freePointer ]. szTableOwner notNil ifTrue: [ szTableOwner freePointer ]. szTableName notNil ifTrue: [ szTableName freePointer ] ]
getSQLStatistics: tableQualifier tableOwner: tableOwner tableName: tableName unique: uniqueSymbol accuracy: accuracySymbol "If supported on the current platform, call the ODBC function SQLStatistics to obtain a list of statistics about a single table and the indexes associated with the table. Sending the message callSQLStatistics:tableOwner:tableName:unique:accuracy: is equivalent to preparing and executing a query using the receiver. After the call completes, the table information is obtained as an answer stream in the normal way (i.e. send the message answer and then use the answer stream to fetch the rows). Each row is an Array with one element for each column. The columns of the answer set are defined in the ODBC documentation as: TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, NON_UNIQUE, INDEX_QUALIFIER, INDEX_NAME, and TYPE. Refer to the Informix CLI or ODBC documentation for more details. The arguments tableQualifier, tableOwner, and tableName are directly passed to the function and take their definitions from the function definition. The argument uniqueSymbol must be either #SQL_INDEX_UNIQUE or #SQL_INDEX_ALL. The argument accuracySymbol must be either #SQL_ENSURE or #SQL_QUICK." | xif szTableQualfier szTableOwner szTableName fUnique fAccuracy rc | xif := self class xif. "Check first that the driver supports functionality." (connection supportsFunction: #SQL_API_SQLSTATISTICS) ifFalse: [ self class connectionClass unsupportedDriverFunctionalitySignal raise ]. self startPrepare. self state: #executing. "Set up the fUnique parameter. uniqueSymbol must be one of #SQL_INDEX_UNIQUE or #SQL_INDEX_ALL." fUnique := xif perform: uniqueSymbol. "Set up the fAccuracy parameter. accuracySymbol must be one of #SQL_ENSURE or #SQL_QUICK." fAccuracy := xif perform: accuracySymbol. [ "Begin unwind protection." | tqByteArray toByteArray tnByteArray | szTableQualfier := szTableOwner := szTableName := nil. tableQualifier isNil ifFalse: [ tqByteArray := tableQualifier asByteArrayEncoding: self encoding. szTableQualfier := tqByteArray perform: xif copyToHeapSelector ]. tableOwner isNil ifFalse: [ toByteArray := tableOwner asByteArrayEncoding: self connection encoding. szTableOwner := toByteArray perform: xif copyToHeapSelector ]. tableName isNil ifFalse: [ tnByteArray := tableName asByteArrayEncoding: self connection encoding. szTableName := tnByteArray perform: xif copyToHeapSelector ]. rc := xif SQLStatistics: self hstmt with: szTableQualfier with: tqByteArray size with: szTableOwner with: toByteArray size with: szTableName with: tnByteArray size with: fUnique with: fAccuracy. (rc == xif SQL_SUCCESS or: [rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getStatementErrors. self resultsCache: errs ]. "End unwind protection." ] ensure: [ szTableQualfier notNil ifTrue: [ szTableQualfier freePointer ]. szTableOwner notNil ifTrue: [ szTableOwner freePointer ]. szTableName notNil ifTrue: [ szTableName freePointer ] ]
getSQLTables: tableQualifier tableOwner: tableOwner tableName: tableName tableType: tableType "If supported on the current platform, call the ODBC function SQLTables to obtain a list of names of tables stored in the current data source. Sending the message callSQLTables:tableOwner:tableName:tableType: is equivalent to preparing and executing a query using the receiver. After the call completes, the table information is obtained as an answer stream in the normal way (i.e. send the message answer and then use the answer stream to fetch the rows). Each row is an Array with one element for each column. The columns of the answer set are defined in the ODBC documentation as: TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, TABLE_TYPE, and REMARKS. Refer to the Informix CLI or ODBC documentation for more details. The arguments tableQualifier, tableOwner, tableName, and tableType are directly passed to the function and take their definitions from the function definition." | xif szTableQualfier szTableOwner szTableName szTableType rc | xif := self class xif. "Check first that the driver supports functionality." (connection supportsFunction: #SQL_API_SQLTABLES) ifFalse: [ self class connectionClass unsupportedDriverFunctionalitySignal raise ]. self startPrepare. self state: #executing. [ "Begin unwind protection." | tqByteArray toByteArray tnByteArray ttByteArray | szTableQualfier := szTableOwner := szTableName := szTableType := nil. tableQualifier isNil ifFalse: [ tqByteArray := tableQualifier asByteArrayEncoding: self encoding. szTableQualfier := tqByteArray perform: xif copyToHeapSelector ]. tableOwner isNil ifFalse: [ toByteArray := tableOwner asByteArrayEncoding: self connection encoding. szTableOwner := toByteArray perform: xif copyToHeapSelector ]. tableName isNil ifFalse: [ tnByteArray := tableName asByteArrayEncoding: self connection encoding. szTableName := tnByteArray perform: xif copyToHeapSelector ]. tableType isNil ifFalse: [ ttByteArray := tableType asByteArrayEncoding: self connection encoding. szTableType := ttByteArray perform: xif copyToHeapSelector ]. rc := xif SQLTables: self hstmt with: szTableQualfier with: tqByteArray size with: szTableOwner with: toByteArray size with: szTableName with: tnByteArray size with: szTableType with: ttByteArray size. (rc == xif SQL_SUCCESS or: [rc == xif SQL_SUCCESS_WITH_INFO]) ifFalse: [ | errs | errs := self getStatementErrors. self resultsCache: errs ]. "End unwind protection." ] ensure: [ szTableQualfier notNil ifTrue: [ szTableQualfier freePointer ]. szTableOwner notNil ifTrue: [ szTableOwner freePointer ]. szTableName notNil ifTrue: [ szTableName freePointer ]. szTableType notNil ifTrue: [ szTableType freePointer ] ]
</methods> <methods> Database.ODBCSession <category>initialize-release</category>
initialize super initialize. hstmtHolder := nil asValue. mustResendQueryHolder := false asValue. sqlStatementOptionCache := IdentityDictionary new. self setMaxLongData: DefaultMaxLongData. self unicode: false.
</methods> <methods> Database.ODBCSession class <category>accessing</category>
bufferClass "Answer the class to use for bindInput/Output objects associated with receiver." ^ODBCBuffer
connectionClass "Answer the class to use for connection objects associated with receiver." ^ODBCConnection
defaultMaxLongData ^DefaultMaxLongData
defaultMaxLongData: anInteger DefaultMaxLongData := anInteger
largeObjectBufferClass "Answer the class to use for bindInput/Output objects associated with receiver." ^ODBCLargeObjectBuffer
</methods> <methods> Database.ODBCSession class <category>class initialization</category>
initialize "ODBCSession initialize" self initRegistry. DefaultMaxLongData := 16777216. "Default to 16 megs of long data" self initializeSQLStatementOptionConversionMap. self install.
initializeSQLStatementOptionConversionMap "ODBCConnection initializeSQLStatementOptionConversionMap" (SQLStatementOptionConversionMap := IdentityDictionary new) add: #SQL_ASYNC_ENABLE->#longAt:; "(ODBC 1.0)" add: #SQL_BIND_TYPE->#longAt:; "(ODBC 1.0)" add: #SQL_CONCURRENCY->#longAt:; "(ODBC 2.0)" add: #SQL_CURSOR_TYPE->#longAt:; "(ODBC 2.0)" add: #SQL_KEYSET_SIZE->#longAt:; "(ODBC 2.0)" add: #SQL_MAX_LENGTH->#longAt:; "(ODBC 1.0)" add: #SQL_MAX_ROWS->#longAt:; "(ODBC 1.0)" add: #SQL_NOSCAN->#longAt:; "(ODBC 1.0)" add: #SQL_QUERY_TIMEOUT->#longAt:; "(ODBC 1.0)" add: #SQL_RETRIEVE_DATA->#longAt:; "(ODBC 2.0)" add: #SQL_ROWSET_SIZE->#longAt:; "(ODBC 2.0)" add: #SQL_SIMULATE_CURSOR->#longAt:; "(ODBC 2.0)" add: #SQL_USE_BOOKMARKS->#longAt:. "(ODBC 2.0)"
</methods> <methods> Database.ODBCSession class <category>private-activation</category>
install self bufferClass install.
</methods> <methods> Database.ODBCSession class <category>private-registry</category>
registry ^RegisteredODBCSessions
registry: aCollection RegisteredODBCSessions := aCollection
</methods> <methods> Database.ODBCSession class <category>signal constants</category>
unableToSetStatementOptionsSignal ^UnableToSetStatementOptions
</methods> <methods> Core.Integer <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#Integer
</methods> <methods> Core.WordArray <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#WordArray
</methods> <methods> Core.String <category>private-odbc</category>
asBooleanForODBC "Try to interpret the string as a Boolean using a common Cobol paradigm. Treat the value as null if it doesn't match the encoded value for true or false." self size == 1 ifTrue: [ self = 'Y' ifTrue: [ ^true ]. self = 'N' ifTrue: [ ^false ] ]. ^nil
</methods> <methods> Core.Object <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses. The default is no conversion is defined" ^nil
</methods> <methods> Core.FixedPoint <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#FixedPoint
</methods> <methods> Core.ByteArray <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." self size > 255 ifTrue: [^#LargeByteArray]. ^#ByteArray
</methods> <methods> OS.BufferedExternalStream <category>private-odbc</category>
odbcConversion ^self isBinary ifTrue: [^#LargeByteArray ] ifFalse: [^#LargeString ]
</methods> <methods> Core.LargeInteger <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#LargeInteger
</methods> <methods> Core.EncodedStream <category>private-odbc</category>
odbcConversion ^((self binary ) ifTrue: [ #BinaryStream ] ifFalse: [ #CharacterStream ])
</methods> <methods> Core.Double <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#Double
</methods> <methods> Core.Timestamp <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#Timestamp
</methods> <methods> Core.Boolean <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#Boolean
printStringForODBC "Encode receiver in one character using a common Cobol paradigm." ^self ifTrue: [ 'Y' ] ifFalse: [ 'N' ]
</methods> <methods> Core.Time <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#Time
</methods> <methods> Core.Random <category>private-odbc</category>
odbcConversion ^#BinaryStream
</methods> <methods> Core.Float <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#Float
</methods> <methods> Core.PositionableStream <category>private-odbc</category>
odbcConversion (collection isKindOf: ByteArray ) ifTrue: [^#LargeByteArray ]. (collection isKindOf: CharacterArray ) ifTrue: [^#LargeString ]. self error: 'The receiver does not have an appropriate ODBC conversion type.'
</methods> <methods> Core.Date <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." ^#Date
</methods> <methods> Core.CharacterArray <category>private-odbc</category>
odbcConversion "Answer the symbolic conversion name for instances of this class or subclasses." self size > 255 ifTrue: [^#LargeString]. ^#String
</methods> <methods> Database.ODBCCLIInterface <category>procedures</category>
SQLAllocConnect: henv with: phdbc <C: RETCODE SQLAllocConnect(HENV henv, HDBC * phdbc)> ^self externalAccessFailed
SQLAllocEnv: phenv <C: RETCODE SQLAllocEnv(HENV * phenv)> ^self externalAccessFailed
SQLAllocStmt: hdbc with: phstmt <C: RETCODE SQLAllocStmt(HDBC hdbc, HSTMT * phstmt)> ^self externalAccessFailed
SQLBindCol: hstmt with: icol with: fCType with: rgbValue with: cbValueMax with: pcbValue <C: RETCODE SQLBindCol(HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD * pcbValue)> ^self externalAccessFailed
SQLBindParameter: hstmt with: ipar with: fParamType with: fCType with: fSqlType with: cbColDef with: ibScale with: rgbValue with: cbValueMax with: pcbValue <C: RETCODE SQLBindParameter(HSTMT hstmt, UWORD ipar, SWORD fParamType, SWORD fCType, SWORD fSqlType, UDWORD cbColDef, SWORD ibScale, PTR rgbValue, SDWORD cbValueMax, SDWORD * pcbValue)> ^self externalAccessFailed
SQLBrowseConnect: hdbc with: szConnStrIn with: cbConnStrIn with: szConnStrOut with: cbConnStrOutMax with: pcbConnStrOut <C: RETCODE SQLBrowseConnect(HDBC hdbc, UCHAR * szConnStrIn, SWORD cbConnStrIn, UCHAR * szConnStrOut, SWORD cbConnStrOutMax, SWORD * pcbConnStrOut)> ^self externalAccessFailed
SQLCancel: hstmt <C: RETCODE SQLCancel(HSTMT hstmt)> ^self externalAccessFailed
SQLColAttributes: hstmt with: icol with: fDescType with: rgbDesc with: cbDescMax with: pcbDesc with: pfDesc <C: RETCODE SQLColAttributes(HSTMT hstmt, UWORD icol, UWORD fDescType, PTR rgbDesc, SWORD cbDescMax, SWORD * pcbDesc, SDWORD * pfDesc)> ^self externalAccessFailed
SQLColumnPrivileges: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: szColumnName with: cbColumnName <C: RETCODE SQLColumnPrivileges(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UCHAR * szColumnName, SWORD cbColumnName)> ^self externalAccessFailed
SQLColumns: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: szColumnName with: cbColumnName <C: RETCODE SQLColumns(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UCHAR * szColumnName, SWORD cbColumnName)> ^self externalAccessFailed
SQLConnect: hdbc with: szDSN with: cbDSN with: szUID with: cbUID with: szAuthStr with: cbAuthStr <C: RETCODE SQLConnect(HDBC hdbc, UCHAR * szDSN, SWORD cbDSN, UCHAR * szUID, SWORD cbUID, UCHAR * szAuthStr, SWORD cbAuthStr)> ^self externalAccessFailed
SQLDataSources: henv with: fDirection with: szDSN with: cbDSNMax with: pcbDSN with: szDescription with: cbDescriptionMax with: pcbDescription <C: RETCODE SQLDataSources(HENV henv, UWORD fDirection, UCHAR * szDSN, SWORD cbDSNMax, SWORD * pcbDSN, UCHAR * szDescription, SWORD cbDescriptionMax, SWORD * pcbDescription)> ^self externalAccessFailed
SQLDescribeCol: hstmt with: icol with: szColName with: cbColNameMax with: pcbColName with: pfSqlType with: pcbColDef with: pibScale with: pfNullable <C: RETCODE SQLDescribeCol(HSTMT hstmt, UWORD icol, UCHAR * szColName, SWORD cbColNameMax, SWORD * pcbColName, SWORD * pfSqlType, UDWORD * pcbColDef, SWORD * pibScale, SWORD * pfNullable)> ^self externalAccessFailed
SQLDescribeParam: hstmt with: ipar with: pfSqlType with: pcbColDef with: pibScale with: pfNullable <C: RETCODE SQLDescribeParam(HSTMT hstmt, UWORD ipar, SWORD * pfSqlType, UDWORD * pcbColDef, SWORD * pibScale, SWORD * pfNullable)> ^self externalAccessFailed
SQLDisconnect: hdbc <C: RETCODE SQLDisconnect(HDBC hdbc)> ^self externalAccessFailed
SQLDriverConnect: hdbc with: hwnd with: szConnStrIn with: cbConnStrIn with: szConnStrOut with: cbConnStrOutMax with: pcbConnStrOut with: fDriverCompletion <C: RETCODE SQLDriverConnect(HDBC hdbc, HWND hwnd, UCHAR * szConnStrIn, SWORD cbConnStrIn, UCHAR * szConnStrOut, SWORD cbConnStrOutMax, SWORD * pcbConnStrOut, UWORD fDriverCompletion)> ^self externalAccessFailed
SQLDrivers: henv with: fDirection with: szDriverDesc with: cbDriverDescMax with: pcbDriverDesc with: szDriverAttributes with: cbDrvrAttrMax with: pcbDrvrAttr <C: RETCODE SQLDrivers(HENV henv, UWORD fDirection, UCHAR * szDriverDesc, SWORD cbDriverDescMax, SWORD * pcbDriverDesc, UCHAR * szDriverAttributes, SWORD cbDrvrAttrMax, SWORD * pcbDrvrAttr)> ^self externalAccessFailed
SQLError: henv with: hdbc with: hstmt with: szSqlState with: pfNativeError with: szErrorMsg with: cbErrorMsgMax with: pcbErrorMsg <C: RETCODE SQLError(HENV henv, HDBC hdbc, HSTMT hstmt, UCHAR * szSqlState, SDWORD * pfNativeError, UCHAR * szErrorMsg, SWORD cbErrorMsgMax, SWORD * pcbErrorMsg)> ^self externalAccessFailed
SQLExecDirect: hstmt with: szSqlStr with: cbSqlStr <C: RETCODE SQLExecDirect(HSTMT hstmt, UCHAR * szSqlStr, SDWORD cbSqlStr)> ^self externalAccessFailed
SQLExecute: hstmt <C: RETCODE SQLExecute(HSTMT hstmt)> ^self externalAccessFailed
SQLExtendedFetch: hstmt with: fFetchType with: irow with: pcrow with: rgfRowStatus <C: RETCODE SQLExtendedFetch(HSTMT hstmt, UWORD fFetchType, SDWORD irow, UDWORD * pcrow, UWORD * rgfRowStatus)> ^self externalAccessFailed
SQLFetch: hstmt <C: RETCODE SQLFetch(HSTMT hstmt)> ^self externalAccessFailed
SQLForeignKeys: hstmt with: szPkTableQualifier with: cbPkTableQualifier with: szPkTableOwner with: cbPkTableOwner with: szPkTableName with: cbPkTableName with: szFkTableQualifier with: cbFkTableQualifier with: szFkTableOwner with: cbFkTableOwner with: szFkTableName with: cbFkTableName <C: RETCODE SQLForeignKeys(HSTMT hstmt, UCHAR * szPkTableQualifier, SWORD cbPkTableQualifier, UCHAR * szPkTableOwner, SWORD cbPkTableOwner, UCHAR * szPkTableName, SWORD cbPkTableName, UCHAR * szFkTableQualifier, SWORD cbFkTableQualifier, UCHAR * szFkTableOwner, SWORD cbFkTableOwner, UCHAR * szFkTableName, SWORD cbFkTableName)> ^self externalAccessFailed
SQLFreeConnect: hdbc <C: RETCODE SQLFreeConnect(HDBC hdbc)> ^self externalAccessFailed
SQLFreeEnv: henv <C: RETCODE SQLFreeEnv(HENV henv)> ^self externalAccessFailed
SQLFreeStmt: hstmt with: fOption <C: RETCODE SQLFreeStmt(HSTMT hstmt, UWORD fOption)> ^self externalAccessFailed
SQLGetConnectOption: hdbc with: fOption with: pvParam <C: RETCODE SQLGetConnectOption(HDBC hdbc, UWORD fOption, PTR pvParam)> ^self externalAccessFailed
SQLGetCursorName: hstmt with: szCursor with: cbCursorMax with: pcbCursor <C: RETCODE SQLGetCursorName(HSTMT hstmt, UCHAR * szCursor, SWORD cbCursorMax, SWORD * pcbCursor)> ^self externalAccessFailed
SQLGetData: hstmt with: icol with: fCType with: rgbValue with: cbValueMax with: pcbValue <C: RETCODE SQLGetData(HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD * pcbValue)> ^self externalAccessFailed
SQLGetFunctions: hdbc with: fFunction with: pfExists <C: RETCODE SQLGetFunctions(HDBC hdbc, UWORD fFunction, UWORD * pfExists)> ^self externalAccessFailed
SQLGetInfo: hdbc with: fInfoType with: rgbInfoValue with: cbInfoValueMax with: pcbInfoValue <C: RETCODE SQLGetInfo(HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue, SWORD cbInfoValueMax, SWORD * pcbInfoValue)> ^self externalAccessFailed
SQLGetStmtOption: hstmt with: fOption with: pvParam <C: RETCODE SQLGetStmtOption(HSTMT hstmt, UWORD fOption, PTR pvParam)> ^self externalAccessFailed
SQLGetTypeInfo: hstmt with: fSqlType <C: RETCODE SQLGetTypeInfo(HSTMT hstmt, SWORD fSqlType)> ^self externalAccessFailed
SQLMoreResults: hstmt <C: RETCODE SQLMoreResults(HSTMT hstmt)> ^self externalAccessFailed
SQLNativeSql: hdbc with: szSqlStrIn with: cbSqlStrIn with: szSqlStr with: cbSqlStrMax with: pcbSqlStr <C: RETCODE SQLNativeSql(HDBC hdbc, UCHAR * szSqlStrIn, SDWORD cbSqlStrIn, UCHAR * szSqlStr, SDWORD cbSqlStrMax, SDWORD * pcbSqlStr)> ^self externalAccessFailed
SQLNumParams: hstmt with: pcpar <C: RETCODE SQLNumParams(HSTMT hstmt, SWORD * pcpar)> ^self externalAccessFailed
SQLNumResultCols: hstmt with: pccol <C: RETCODE SQLNumResultCols(HSTMT hstmt, SWORD * pccol)> ^self externalAccessFailed
SQLParamData: hstmt with: prgbValue <C: RETCODE SQLParamData(HSTMT hstmt, PTR * prgbValue)> ^self externalAccessFailed
SQLParamOptions: hstmt with: crow with: pirow <C: RETCODE SQLParamOptions(HSTMT hstmt, UDWORD crow, UDWORD * pirow)> ^self externalAccessFailed
SQLPrepare: hstmt with: szSqlStr with: cbSqlStr <C: RETCODE SQLPrepare(HSTMT hstmt, UCHAR * szSqlStr, SDWORD cbSqlStr)> ^self externalAccessFailed
SQLPrimaryKeys: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName <C: RETCODE SQLPrimaryKeys(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName)> ^self externalAccessFailed
SQLProcedureColumns: hstmt with: szProcQualifier with: cbProcQualifier with: szProcOwner with: cbProcOwner with: szProcName with: cbProcName with: szColumnName with: cbColumnName <C: RETCODE SQLProcedureColumns(HSTMT hstmt, UCHAR * szProcQualifier, SWORD cbProcQualifier, UCHAR * szProcOwner, SWORD cbProcOwner, UCHAR * szProcName, SWORD cbProcName, UCHAR * szColumnName, SWORD cbColumnName)> ^self externalAccessFailed
SQLProcedures: hstmt with: szProcQualifier with: cbProcQualifier with: szProcOwner with: cbProcOwner with: szProcName with: cbProcName <C: RETCODE SQLProcedures(HSTMT hstmt, UCHAR * szProcQualifier, SWORD cbProcQualifier, UCHAR * szProcOwner, SWORD cbProcOwner, UCHAR * szProcName, SWORD cbProcName)> ^self externalAccessFailed
SQLPutData: hstmt with: rgbValue with: cbValue <C: RETCODE SQLPutData(HSTMT hstmt, PTR rgbValue, SDWORD cbValue)> ^self externalAccessFailed
SQLRowCount: hstmt with: pcrow <C: RETCODE SQLRowCount(HSTMT hstmt, SDWORD * pcrow)> ^self externalAccessFailed
SQLSetConnectOption: hdbc with: fOption with: vParam <C: RETCODE SQLSetConnectOption(HDBC hdbc, UWORD fOption, UDWORD vParam)> ^self externalAccessFailed
SQLSetCursorName: hstmt with: szCursor with: cbCursor <C: RETCODE SQLSetCursorName(HSTMT hstmt, UCHAR * szCursor, SWORD cbCursor)> ^self externalAccessFailed
SQLSetEnvAttr: henv with: attrName with: valuePointer with: attrType <C: RETCODE SQLSetEnvAttr(HENV henv, SDWORD attrName, PTR valuePointer, SDWORD attrType)> ^self externalAccessFailed
SQLSetParam: hstmt with: ipar with: fCType with: fSqlType with: cbColDef with: ibScale with: rgbValue with: pcbValue <C: RETCODE SQLSetParam(HSTMT hstmt, UWORD ipar, SWORD fCType, SWORD fSqlType, UDWORD cbColDef, SWORD ibScale, PTR rgbValue, SDWORD * pcbValue)> ^self externalAccessFailed
SQLSetPos: hstmt with: irow with: fOption with: fLock <C: RETCODE SQLSetPos(HSTMT hstmt, UWORD irow, UWORD fOption, UWORD fLock)> ^self externalAccessFailed
SQLSetScrollOptions: hstmt with: fConcurrency with: crowKeyset with: crowRowset <C: RETCODE SQLSetScrollOptions(HSTMT hstmt, UWORD fConcurrency, SDWORD crowKeyset, UWORD crowRowset)> ^self externalAccessFailed
SQLSetStmtOption: hstmt with: fOption with: vParam <C: RETCODE SQLSetStmtOption(HSTMT hstmt, UWORD fOption, UDWORD vParam)> ^self externalAccessFailed
SQLSpecialColumns: hstmt with: fColType with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: fScope with: fNullable <C: RETCODE SQLSpecialColumns(HSTMT hstmt, UWORD fColType, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UWORD fScope, UWORD fNullable)> ^self externalAccessFailed
SQLStatistics: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: fUnique with: fAccuracy <C: RETCODE SQLStatistics(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UWORD fUnique, UWORD fAccuracy)> ^self externalAccessFailed
SQLTablePrivileges: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName <C: RETCODE SQLTablePrivileges(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName)> ^self externalAccessFailed
SQLTables: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: szTableType with: cbTableType <C: RETCODE SQLTables(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UCHAR * szTableType, SWORD cbTableType)> ^self externalAccessFailed
SQLTransact: henv with: hdbc with: fType <C: RETCODE SQLTransact(HENV henv, HDBC hdbc, UWORD fType)> ^self externalAccessFailed
</methods> <methods> Database.ODBCCLINTInterface <category>procedures</category>
SQLAllocConnect: henv with: phdbc <C: RETCODE SQLAllocConnect(HENV henv, HDBC * phdbc)> ^self externalAccessFailed
SQLAllocEnv: phenv <C: RETCODE SQLAllocEnv(HENV * phenv)> ^self externalAccessFailed
SQLAllocStmt: hdbc with: phstmt <C: RETCODE SQLAllocStmt(HDBC hdbc, HSTMT * phstmt)> ^self externalAccessFailed
SQLBindCol: hstmt with: icol with: fCType with: rgbValue with: cbValueMax with: pcbValue <C: RETCODE SQLBindCol(HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD * pcbValue)> ^self externalAccessFailed
SQLBindParameter: hstmt with: ipar with: fParamType with: fCType with: fSqlType with: cbColDef with: ibScale with: rgbValue with: cbValueMax with: pcbValue <C: RETCODE SQLBindParameter(HSTMT hstmt, UWORD ipar, SWORD fParamType, SWORD fCType, SWORD fSqlType, UDWORD cbColDef, SWORD ibScale, PTR rgbValue, SDWORD cbValueMax, SDWORD * pcbValue)> ^self externalAccessFailed
SQLBrowseConnect: hdbc with: szConnStrIn with: cbConnStrIn with: szConnStrOut with: cbConnStrOutMax with: pcbConnStrOut <C: RETCODE SQLBrowseConnect(HDBC hdbc, UCHAR * szConnStrIn, SWORD cbConnStrIn, UCHAR * szConnStrOut, SWORD cbConnStrOutMax, SWORD * pcbConnStrOut)> ^self externalAccessFailed
SQLCancel: hstmt <C: RETCODE SQLCancel(HSTMT hstmt)> ^self externalAccessFailed
SQLColAttributes: hstmt with: icol with: fDescType with: rgbDesc with: cbDescMax with: pcbDesc with: pfDesc <C: RETCODE SQLColAttributes(HSTMT hstmt, UWORD icol, UWORD fDescType, PTR rgbDesc, SWORD cbDescMax, SWORD * pcbDesc, SDWORD * pfDesc)> ^self externalAccessFailed
SQLColumnPrivileges: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: szColumnName with: cbColumnName <C: RETCODE SQLColumnPrivileges(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UCHAR * szColumnName, SWORD cbColumnName)> ^self externalAccessFailed
SQLColumns: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: szColumnName with: cbColumnName <C: RETCODE SQLColumns(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UCHAR * szColumnName, SWORD cbColumnName)> ^self externalAccessFailed
SQLConnect: hdbc with: szDSN with: cbDSN with: szUID with: cbUID with: szAuthStr with: cbAuthStr <C: RETCODE SQLConnect(HDBC hdbc, UCHAR * szDSN, SWORD cbDSN, UCHAR * szUID, SWORD cbUID, UCHAR * szAuthStr, SWORD cbAuthStr)> ^self externalAccessFailed
SQLDataSources: henv with: fDirection with: szDSN with: cbDSNMax with: pcbDSN with: szDescription with: cbDescriptionMax with: pcbDescription <C: RETCODE SQLDataSources(HENV henv, UWORD fDirection, UCHAR * szDSN, SWORD cbDSNMax, SWORD * pcbDSN, UCHAR * szDescription, SWORD cbDescriptionMax, SWORD * pcbDescription)> ^self externalAccessFailed
SQLDescribeCol: hstmt with: icol with: szColName with: cbColNameMax with: pcbColName with: pfSqlType with: pcbColDef with: pibScale with: pfNullable <C: RETCODE SQLDescribeCol(HSTMT hstmt, UWORD icol, UCHAR * szColName, SWORD cbColNameMax, SWORD * pcbColName, SWORD * pfSqlType, UDWORD * pcbColDef, SWORD * pibScale, SWORD * pfNullable)> ^self externalAccessFailed
SQLDescribeParam: hstmt with: ipar with: pfSqlType with: pcbColDef with: pibScale with: pfNullable <C: RETCODE SQLDescribeParam(HSTMT hstmt, UWORD ipar, SWORD * pfSqlType, UDWORD * pcbColDef, SWORD * pibScale, SWORD * pfNullable)> ^self externalAccessFailed
SQLDisconnect: hdbc <C: RETCODE SQLDisconnect(HDBC hdbc)> ^self externalAccessFailed
SQLDriverConnect: hdbc with: hwnd with: szConnStrIn with: cbConnStrIn with: szConnStrOut with: cbConnStrOutMax with: pcbConnStrOut with: fDriverCompletion <C: RETCODE SQLDriverConnect(HDBC hdbc, HWND hwnd, UCHAR * szConnStrIn, SWORD cbConnStrIn, UCHAR * szConnStrOut, SWORD cbConnStrOutMax, SWORD * pcbConnStrOut, UWORD fDriverCompletion)> ^self externalAccessFailed
SQLDrivers: henv with: fDirection with: szDriverDesc with: cbDriverDescMax with: pcbDriverDesc with: szDriverAttributes with: cbDrvrAttrMax with: pcbDrvrAttr <C: RETCODE SQLDrivers(HENV henv, UWORD fDirection, UCHAR * szDriverDesc, SWORD cbDriverDescMax, SWORD * pcbDriverDesc, UCHAR * szDriverAttributes, SWORD cbDrvrAttrMax, SWORD * pcbDrvrAttr)> ^self externalAccessFailed
SQLError: henv with: hdbc with: hstmt with: szSqlState with: pfNativeError with: szErrorMsg with: cbErrorMsgMax with: pcbErrorMsg <C: RETCODE SQLError(HENV henv, HDBC hdbc, HSTMT hstmt, UCHAR * szSqlState, SDWORD * pfNativeError, UCHAR * szErrorMsg, SWORD cbErrorMsgMax, SWORD * pcbErrorMsg)> ^self externalAccessFailed
SQLExecDirect: hstmt with: szSqlStr with: cbSqlStr <C: RETCODE SQLExecDirect(HSTMT hstmt, UCHAR * szSqlStr, SDWORD cbSqlStr)> ^self externalAccessFailed
SQLExecute: hstmt <C: RETCODE SQLExecute(HSTMT hstmt)> ^self externalAccessFailed
SQLExtendedFetch: hstmt with: fFetchType with: irow with: pcrow with: rgfRowStatus <C: RETCODE SQLExtendedFetch(HSTMT hstmt, UWORD fFetchType, SDWORD irow, UDWORD * pcrow, UWORD * rgfRowStatus)> ^self externalAccessFailed
SQLFetch: hstmt <C: RETCODE SQLFetch(HSTMT hstmt)> ^self externalAccessFailed
SQLForeignKeys: hstmt with: szPkTableQualifier with: cbPkTableQualifier with: szPkTableOwner with: cbPkTableOwner with: szPkTableName with: cbPkTableName with: szFkTableQualifier with: cbFkTableQualifier with: szFkTableOwner with: cbFkTableOwner with: szFkTableName with: cbFkTableName <C: RETCODE SQLForeignKeys(HSTMT hstmt, UCHAR * szPkTableQualifier, SWORD cbPkTableQualifier, UCHAR * szPkTableOwner, SWORD cbPkTableOwner, UCHAR * szPkTableName, SWORD cbPkTableName, UCHAR * szFkTableQualifier, SWORD cbFkTableQualifier, UCHAR * szFkTableOwner, SWORD cbFkTableOwner, UCHAR * szFkTableName, SWORD cbFkTableName)> ^self externalAccessFailed
SQLFreeConnect: hdbc <C: RETCODE SQLFreeConnect(HDBC hdbc)> ^self externalAccessFailed
SQLFreeEnv: henv <C: RETCODE SQLFreeEnv(HENV henv)> ^self externalAccessFailed
SQLFreeStmt: hstmt with: fOption <C: RETCODE SQLFreeStmt(HSTMT hstmt, UWORD fOption)> ^self externalAccessFailed
SQLGetConnectOption: hdbc with: fOption with: pvParam <C: RETCODE SQLGetConnectOption(HDBC hdbc, UWORD fOption, PTR pvParam)> ^self externalAccessFailed
SQLGetCursorName: hstmt with: szCursor with: cbCursorMax with: pcbCursor <C: RETCODE SQLGetCursorName(HSTMT hstmt, UCHAR * szCursor, SWORD cbCursorMax, SWORD * pcbCursor)> ^self externalAccessFailed
SQLGetData: hstmt with: icol with: fCType with: rgbValue with: cbValueMax with: pcbValue <C: RETCODE SQLGetData(HSTMT hstmt, UWORD icol, SWORD fCType, PTR rgbValue, SDWORD cbValueMax, SDWORD * pcbValue)> ^self externalAccessFailed
SQLGetFunctions: hdbc with: fFunction with: pfExists <C: RETCODE SQLGetFunctions(HDBC hdbc, UWORD fFunction, UWORD * pfExists)> ^self externalAccessFailed
SQLGetInfo: hdbc with: fInfoType with: rgbInfoValue with: cbInfoValueMax with: pcbInfoValue <C: RETCODE SQLGetInfo(HDBC hdbc, UWORD fInfoType, PTR rgbInfoValue, SWORD cbInfoValueMax, SWORD * pcbInfoValue)> ^self externalAccessFailed
SQLGetStmtOption: hstmt with: fOption with: pvParam <C: RETCODE SQLGetStmtOption(HSTMT hstmt, UWORD fOption, PTR pvParam)> ^self externalAccessFailed
SQLGetTypeInfo: hstmt with: fSqlType <C: RETCODE SQLGetTypeInfo(HSTMT hstmt, SWORD fSqlType)> ^self externalAccessFailed
SQLMoreResults: hstmt <C: RETCODE SQLMoreResults(HSTMT hstmt)> ^self externalAccessFailed
SQLNativeSql: hdbc with: szSqlStrIn with: cbSqlStrIn with: szSqlStr with: cbSqlStrMax with: pcbSqlStr <C: RETCODE SQLNativeSql(HDBC hdbc, UCHAR * szSqlStrIn, SDWORD cbSqlStrIn, UCHAR * szSqlStr, SDWORD cbSqlStrMax, SDWORD * pcbSqlStr)> ^self externalAccessFailed
SQLNumParams: hstmt with: pcpar <C: RETCODE SQLNumParams(HSTMT hstmt, SWORD * pcpar)> ^self externalAccessFailed
SQLNumResultCols: hstmt with: pccol <C: RETCODE SQLNumResultCols(HSTMT hstmt, SWORD * pccol)> ^self externalAccessFailed
SQLParamData: hstmt with: prgbValue <C: RETCODE SQLParamData(HSTMT hstmt, PTR * prgbValue)> ^self externalAccessFailed
SQLParamOptions: hstmt with: crow with: pirow <C: RETCODE SQLParamOptions(HSTMT hstmt, UDWORD crow, UDWORD * pirow)> ^self externalAccessFailed
SQLPrepare: hstmt with: szSqlStr with: cbSqlStr <C: RETCODE SQLPrepare(HSTMT hstmt, UCHAR * szSqlStr, SDWORD cbSqlStr)> ^self externalAccessFailed
SQLPrimaryKeys: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName <C: RETCODE SQLPrimaryKeys(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName)> ^self externalAccessFailed
SQLProcedureColumns: hstmt with: szProcQualifier with: cbProcQualifier with: szProcOwner with: cbProcOwner with: szProcName with: cbProcName with: szColumnName with: cbColumnName <C: RETCODE SQLProcedureColumns(HSTMT hstmt, UCHAR * szProcQualifier, SWORD cbProcQualifier, UCHAR * szProcOwner, SWORD cbProcOwner, UCHAR * szProcName, SWORD cbProcName, UCHAR * szColumnName, SWORD cbColumnName)> ^self externalAccessFailed
SQLProcedures: hstmt with: szProcQualifier with: cbProcQualifier with: szProcOwner with: cbProcOwner with: szProcName with: cbProcName <C: RETCODE SQLProcedures(HSTMT hstmt, UCHAR * szProcQualifier, SWORD cbProcQualifier, UCHAR * szProcOwner, SWORD cbProcOwner, UCHAR * szProcName, SWORD cbProcName)> ^self externalAccessFailed
SQLPutData: hstmt with: rgbValue with: cbValue <C: RETCODE SQLPutData(HSTMT hstmt, PTR rgbValue, SDWORD cbValue)> ^self externalAccessFailed
SQLRowCount: hstmt with: pcrow <C: RETCODE SQLRowCount(HSTMT hstmt, SDWORD * pcrow)> ^self externalAccessFailed
SQLSetConnectOption: hdbc with: fOption with: vParam <C: RETCODE SQLSetConnectOption(HDBC hdbc, UWORD fOption, UDWORD vParam)> ^self externalAccessFailed
SQLSetCursorName: hstmt with: szCursor with: cbCursor <C: RETCODE SQLSetCursorName(HSTMT hstmt, UCHAR * szCursor, SWORD cbCursor)> ^self externalAccessFailed
SQLSetParam: hstmt with: ipar with: fCType with: fSqlType with: cbColDef with: ibScale with: rgbValue with: pcbValue <C: RETCODE SQLSetParam(HSTMT hstmt, UWORD ipar, SWORD fCType, SWORD fSqlType, UDWORD cbColDef, SWORD ibScale, PTR rgbValue, SDWORD * pcbValue)> ^self externalAccessFailed
SQLSetPos: hstmt with: irow with: fOption with: fLock <C: RETCODE SQLSetPos(HSTMT hstmt, UWORD irow, UWORD fOption, UWORD fLock)> ^self externalAccessFailed
SQLSetScrollOptions: hstmt with: fConcurrency with: crowKeyset with: crowRowset <C: RETCODE SQLSetScrollOptions(HSTMT hstmt, UWORD fConcurrency, SDWORD crowKeyset, UWORD crowRowset)> ^self externalAccessFailed
SQLSetStmtOption: hstmt with: fOption with: vParam <C: RETCODE SQLSetStmtOption(HSTMT hstmt, UWORD fOption, UDWORD vParam)> ^self externalAccessFailed
SQLSpecialColumns: hstmt with: fColType with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: fScope with: fNullable <C: RETCODE SQLSpecialColumns(HSTMT hstmt, UWORD fColType, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UWORD fScope, UWORD fNullable)> ^self externalAccessFailed
SQLStatistics: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: fUnique with: fAccuracy <C: RETCODE SQLStatistics(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UWORD fUnique, UWORD fAccuracy)> ^self externalAccessFailed
SQLTablePrivileges: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName <C: RETCODE SQLTablePrivileges(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName)> ^self externalAccessFailed
SQLTables: hstmt with: szTableQualifier with: cbTableQualifier with: szTableOwner with: cbTableOwner with: szTableName with: cbTableName with: szTableType with: cbTableType <C: RETCODE SQLTables(HSTMT hstmt, UCHAR * szTableQualifier, SWORD cbTableQualifier, UCHAR * szTableOwner, SWORD cbTableOwner, UCHAR * szTableName, SWORD cbTableName, UCHAR * szTableType, SWORD cbTableType)> ^self externalAccessFailed
SQLTransact: henv with: hdbc with: fType <C: RETCODE SQLTransact(HENV henv, HDBC hdbc, UWORD fType)> ^self externalAccessFailed
</methods> <initialize> Database.ODBCConnection </initialize> <initialize> Database.ODBCCLIInterface </initialize> <initialize> Database.ODBCCLINTInterface </initialize> <initialize> Database.ODBCCLI95Interface </initialize> <initialize> Database.ODBCBuffer </initialize> <initialize> Database.UnableToSetStatementOptions </initialize> <initialize> Database.ODBCSession </initialize> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>Object</name> <environment>Core</environment> <super></super> <private>false</private> none <imports></imports> <category>Kernel-Objects</category> <attributes> <package>Kernel-Objects</package> </attributes> </class> <class> <name>ExternalDatabaseException</name> <environment>Database</environment> <super>Core.Error</super> <private>false</private> none <imports></imports> <category>Database-Interface</category> <attributes> <package>Database</package> </attributes> </class> <class> <name>PositionableStream</name> <environment>Core</environment> <super>Core.PeekableStream</super> <private>false</private> none collection position readLimit writeLimit policy <imports></imports> <category>Collections-Streams</category> <attributes> <package>Collections-Streams</package> </attributes> </class> <class> <name>Float</name> <environment>Core</environment> <super>Core.LimitedPrecisionReal</super> <private>false</private> bytes <imports></imports> <category>Magnitude-Numbers</category> <attributes> <package>Magnitude-Numbers</package> </attributes> </class> <class> <name>Random</name> <environment>Core</environment> <super>Core.Stream</super> <private>false</private> none seed defaultGeneratorClass <imports></imports> <category>Magnitude-Numbers</category> <attributes> <package>Magnitude-Numbers</package> </attributes> </class> <class> <name>ExternalDatabaseTransaction</name> <environment>Database</environment> <super>Database.ExternalDatabaseFramework</super> <private>false</private> none memberCountHolder remainingCountHolder <imports></imports> <category>Database-Interface</category> <attributes> <package>Database</package> </attributes> </class> <class> <name>ExternalDatabaseConnection</name> <environment>Database</environment> <super>Database.ExternalDatabaseFramework</super> <private>false</private> none transaction username password environment transactionCoordinator cachedSession isolationLevel environmentMap xif xifMap dependents <imports></imports> <category>Database-Interface</category> <attributes> <package>Database</package> </attributes> </class> <class> <name>Date</name> <environment>Core</environment> <super>Core.Magnitude</super> <private>false</private> none day year <imports></imports> <category>Magnitude-General</category> <attributes> <package>Magnitude-General</package> </attributes> </class> <class> <name>CharacterArray</name> <environment>Core</environment> <super>Core.ArrayedCollection</super> <private>false</private> none <imports></imports> <category>Collections-Text</category> <attributes> <package>Collections-Text</package> </attributes> </class> <class> <name>ExternalInterface</name> <environment>External</environment> <super>Core.Object</super> <private>false</private> none includeFiles includeDirectories libraryFiles libraryDirectories virtual optimizationLevel <imports> private Kernel.OpcodePool.* </imports> <category>External-Interface</category> <attributes> <package>External-Interface</package> </attributes> </class> <class> <name>Timestamp</name> <environment>Core</environment> <super>Core.Magnitude</super> <private>false</private> none year month day hour minute second millisecond <imports></imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class> <class> <name>Boolean</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Kernel-Objects</category> <attributes> <package>Kernel-Objects</package> </attributes> </class> <class> <name>ExternalDatabaseColumnDescription</name> <environment>Database</environment> <super>Core.Object</super> <private>false</private> none name index type length precision scale nullable <imports></imports> <category>Database-Interface</category> <attributes> <package>Database</package> </attributes> </class> <class> <name>Time</name> <environment>Core</environment> <super>Core.Magnitude</super> <private>false</private> none hours minutes seconds <imports></imports> <category>Magnitude-General</category> <attributes> <package>Magnitude-General</package> </attributes> </class> <class> <name>WordArray</name> <environment>Core</environment> <super>Core.IntegerArray</super> <private>false</private> bytes <imports></imports> <category>Collections-Arrayed</category> <attributes> <package>Collections-Arrayed</package> </attributes> </class> <class> <name>Double</name> <environment>Core</environment> <super>Core.LimitedPrecisionReal</super> <private>false</private> bytes <imports></imports> <category>Magnitude-Numbers</category> <attributes> <package>Magnitude-Numbers</package> </attributes> </class> <class> <name>ByteArray</name> <environment>Core</environment> <super>Core.IntegerArray</super> <private>false</private> bytes <imports></imports> <category>Collections-Arrayed</category> <attributes> <package>Collections-Arrayed</package> </attributes> </class> <class> <name>ExternalDatabaseBuffer</name> <environment>Database</environment> <super>Core.Object</super> <private>false</private> none databaseType encoding elementSize count bufferPointer <imports></imports> <category>Database-Interface</category> <attributes> <package>Database</package> </attributes> </class> <class> <name>String</name> <environment>Core</environment> <super>Core.CharacterArray</super> <private>false</private> none <imports></imports> <category>Collections-Text</category> <attributes> <package>Collections-Text</package> </attributes> </class> <class> <name>BufferedExternalStream</name> <environment>OS</environment> <super>OS.ExternalStream</super> <private>false</private> none lineEndCharacter binary lineEndConvention bufferType ioBuffer ioConnection <imports> private OS.IOConstants.* </imports> <category>OS-Streaming</category> <attributes> <package>OS-Streaming</package> </attributes> </class> <class> <name>Integer</name> <environment>Core</environment> <super>Core.Number</super> <private>false</private> none <imports></imports> <category>Magnitude-Numbers</category> <attributes> <package>Magnitude-Numbers</package> </attributes> </class> <class> <name>ExternalDatabaseSession</name> <environment>Database</environment> <super>Database.ExternalDatabaseFramework</super> <private>false</private> none connection query queryFragments bindInput bindTemplate bindOutput useNamedOutputBinding bindValues resultTemplate allocateForEachRow blockFactor numColumns columnDescriptions rowAdaptors rowBuffersHolder bufferIndex answerStream currentRow scrollable <imports></imports> <category>Database-Interface</category> <attributes> <package>Database</package> </attributes> </class> <class> <name>EncodedStream</name> <environment>Core</environment> <super>Core.PeekableStream</super> <private>false</private> none binary stream encoder policy lineEndConvention lineEndCharacter skipSize <imports> private OS.IOConstants.* </imports> <category>Collections-Streams</category> <attributes> <package>Collections-Streams</package> </attributes> </class> <class> <name>ExternalDatabaseError</name> <environment>Database</environment> <super>Core.Object</super> <private>false</private> none dbmsErrorCode dbmsErrorString osErrorCode osErrorString <imports></imports> <category>Database-Interface</category> <attributes> <package>Database</package> </attributes> </class> <class> <name>FixedPoint</name> <environment>Core</environment> <super>Core.Number</super> <private>false</private> none numerator denominator scale <imports></imports> <category>Magnitude-Numbers</category> <attributes> <package>Magnitude-Numbers</package> </attributes> </class> <class> <name>LargeInteger</name> <environment>Core</environment> <super>Core.Integer</super> <private>false</private> bytes <imports></imports> <category>Magnitude-Numbers</category> <attributes> <package>Magnitude-Numbers</package> </attributes> </class>