(in-package #:odbc)
(def-foreign-type sql-handle :pointer-void)
-(def-foreign-type sql-handle-ptr '(* sql-handle))
-(def-foreign-type string-ptr '(* :unsigned-char))
-(def-type long-ptr-type '(* #.$ODBC-LONG-TYPE))
+(def-foreign-type sql-handle-ptr (* sql-handle))
+(def-foreign-type string-ptr (* :unsigned-char))
+(def-type long-ptr-type (* #.$ODBC-LONG-TYPE))
+;; odbc v3
+(def-function "SQLAllocHandle"
+ ((handle-type :short)
+ (input-handle sql-handle)
+ (*phenv sql-handle-ptr))
+ :module "odbc"
+ :returning :short)
+;; deprecated
(def-function "SQLAllocEnv"
((*phenv sql-handle-ptr) ; HENV FAR *phenv
)
:module "odbc"
:returning :short) ; RETCODE_SQL_API
+;; deprecated
(def-function "SQLAllocConnect"
((henv sql-handle) ; HENV henv
(*phdbc sql-handle-ptr) ; HDBC FAR *phdbc
:module "odbc"
:returning :short) ; RETCODE_SQL_API
+;; deprecated
(def-function "SQLAllocStmt"
((hdbc sql-handle) ; HDBC hdbc
(*phstmt sql-handle-ptr) ; HSTMT FAR *phstmt
(*value :pointer-void)
(szLength :int))
:module "odbc"
- :returning :int)
+ :returning :short)
+
+(def-function "SQLGetEnvAttr"
+ ((henv sql-handle) ; HENV henv
+ (attr :int)
+ (*value :pointer-void)
+ (szLength :int)
+ (string-length-ptr (* :int)))
+ :module "odbc"
+ :returning :short)
(def-function "SQLTables"
((hstmt :pointer-void)
(table-name-length :short)
(table-type-name :pointer-void)
(table-type-name-length :short))
+ :module "odbc"
:returning :short)
(table-name-length :short)
(unique :short)
(reserved :short))
+ :module "odbc"
:returning :short)