X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-odbc%2Fodbc-ff-interface.lisp;h=a7153c8660600a5d7260a967d060a6aee1cbc8ea;hp=4ab8627df91e4ef3a9d5eadde7d1537faa376087;hb=d9f41af62750c622945bb17b622a39689ee5b840;hpb=947d861d8857ce104a5c61ba993c3cf468a730d8 diff --git a/db-odbc/odbc-ff-interface.lisp b/db-odbc/odbc-ff-interface.lisp index 4ab8627..a7153c8 100644 --- a/db-odbc/odbc-ff-interface.lisp +++ b/db-odbc/odbc-ff-interface.lisp @@ -6,7 +6,7 @@ ;;;; Purpose: Function definitions for UFFI interface to ODBC ;;;; Author: Kevin M. Rosenberg ;;;; -;;;; $Id: odbc-package.lisp 7061 2003-09-07 06:34:45Z kevin $ +;;;; $Id$ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2004 by Kevin M. Rosenberg ;;;; and Copyright (C) Paul Meurer 1999 - 2001. All rights reserved. @@ -19,17 +19,26 @@ (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 '(* :int)) +(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 @@ -67,6 +76,7 @@ :module "odbc" :returning :short) ; RETCODE_SQL_API +;; deprecated (def-function "SQLAllocStmt" ((hdbc sql-handle) ; HDBC hdbc (*phstmt sql-handle-ptr) ; HSTMT FAR *phstmt @@ -152,7 +162,7 @@ (cbColNameMax :short) ; SWORD cbColNameMax (*pcbColName (* :short)) ; SWORD FAR *pcbColName (*pfSqlType (* :short)) ; SWORD FAR *pfSqlType - (*pcbColDef (* :unsigned-int)) ; UDWORD FAR *pcbColDef + (*pcbColDef (* #.$ODBC-ULONG-TYPE)) ; UDWORD FAR *pcbColDef (*pibScale (* :short)) ; SWORD FAR *pibScale (*pfNullable (* :short)) ; SWORD FAR *pfNullable ) @@ -354,7 +364,16 @@ (*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) @@ -365,7 +384,10 @@ (table-name :pointer-void) (table-name-length :short) (table-type-name :pointer-void) - (table-type-name-length :short)) + (table-type-name-length :short) + (unique :short) + (reserved :short)) + :module "odbc" :returning :short) @@ -379,6 +401,7 @@ (table-name-length :short) (unique :short) (reserved :short)) + :module "odbc" :returning :short)