X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-odbc%2Fodbc-constants.lisp;h=591a3afa43fcc76c0f7a3f0df4e15bbd62652eae;hb=5bfa219c5e3b387b9dd7c819441f0182ccb16dc8;hp=2f52d9de93198f97edc303545209ccfda005087c;hpb=d0f147d0e7d942b379bd7cd472f26b00c33916bc;p=clsql.git diff --git a/db-odbc/odbc-constants.lisp b/db-odbc/odbc-constants.lisp index 2f52d9d..591a3af 100644 --- a/db-odbc/odbc-constants.lisp +++ b/db-odbc/odbc-constants.lisp @@ -6,7 +6,7 @@ ;;;; Purpose: Constants for UFFI interface to ODBC ;;;; Authors: Kevin M. Rosenberg and Paul Meurer ;;;; -;;;; $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. @@ -18,7 +18,11 @@ (in-package #:odbc) -(defconstant $ODBCVER #x0210) +;; on SuSE AMD64 9.0, unixODBC is compiled with with SQLLEN being 4 bytes long +(defconstant $ODBC-LONG-TYPE :int) +(defconstant $ODBC-ULONG-TYPE :unsigned-int) + +;; (defconstant $ODBCVER #x0210) ;; generally useful constants (defconstant $SQL_SPEC_MAJOR 2) ;; Major version of specification @@ -798,7 +802,6 @@ (defconstant $SQL_POSITION 0) ;; 1.0 FALSE (defconstant $SQL_REFRESH 1) ;; 1.0 TRUE -; #if (ODBCVER >= #x0200)) (defconstant $SQL_UPDATE 2) (defconstant $SQL_DELETE 3) (defconstant $SQL_ADD 4) @@ -891,6 +894,11 @@ (defconstant $SQL_TINYINT -6) (defconstant $SQL_BIT -7) +;; For ODBC3 +(defconstant $SQL_TYPE_DATE 91) +(defconstant $SQL_TYPE_TIME 92) +(defconstant $SQL_TYPE_TIMESTAMP 93) + (defconstant $SQL_INTERVAL_YEAR -80) (defconstant $SQL_INTERVAL_MONTH -81) (defconstant $SQL_INTERVAL_YEAR_TO_MONTH -82) @@ -927,6 +935,11 @@ (defconstant $SQL_C_UTINYINT (+ $SQL_TINYINT $SQL_UNSIGNED_OFFSET)) ;;UNSIGNED TINYINT (defconstant $SQL_C_BOOKMARK $SQL_C_ULONG) ;; BOOKMARK +;;; ODBC3 +(defconstant $SQL_C_TYPE_DATE $SQL_TYPE_DATE) +(defconstant $SQL_C_TYPE_TIME $SQL_TYPE_TIME) +(defconstant $SQL_C_TYPE_TIMESTAMP $SQL_TYPE_TIMESTAMP) + ;; Options for SQLDriverConnect (defconstant $SQL_DRIVER_NOPROMPT 0) (defconstant $SQL_DRIVER_COMPLETE 1) @@ -944,9 +957,14 @@ (defconstant $SQL_FETCH_RELATIVE 6) (defconstant $SQL_FETCH_BOOKMARK 8) -;;; ODBC v3 constants +;;; ODBC v3 constants, added by KMR (defconstant $SQL_ATTR_ODBC_VERSION 200) (defconstant $SQL_OV_ODBC2 2) (defconstant $SQL_OV_ODBC3 3) +(defconstant $SQL_INDEX_UNIQUE 0) +(defconstant $SQL_INDEX_ALL 1) +(defconstant $SQL_QUICK 0) +(defconstant $SQL_ENSURE 1) +