projects
/
clsql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0ca466f
)
r9959: more odbc v3 conversions
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Thu, 2 Sep 2004 22:09:43 +0000
(22:09 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Thu, 2 Sep 2004 22:09:43 +0000
(22:09 +0000)
ChangeLog
patch
|
blob
|
history
db-odbc/odbc-api.lisp
patch
|
blob
|
history
db-odbc/odbc-constants.lisp
patch
|
blob
|
history
db-odbc/odbc-ff-interface.lisp
patch
|
blob
|
history
db-odbc/odbc-sql.lisp
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index 22528ccd2e81953232a365d502cdbf541464542e..e32893b757a20d72ec361b7182ec2b45239571a6 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,6
@@
+02 Sep 2004 Kevin Rosenberg <kevin@rosenberg.net>
+ * db-odbc/odbc-api.lisp: More conversions to ODBC v3
+
02 Sep 2004 Kevin Rosenberg <kevin@rosenberg.net>
* Version 3.0.2 Release
* TODO: Add note about ODBC on Windows
02 Sep 2004 Kevin Rosenberg <kevin@rosenberg.net>
* Version 3.0.2 Release
* TODO: Add note about ODBC on Windows
diff --git
a/db-odbc/odbc-api.lisp
b/db-odbc/odbc-api.lisp
index 492bf826f6dcfaedff31eac124d7da4b5e36a737..4095f6cfeef3d4872add1725fd31daa8cd58f587 100644
(file)
--- a/
db-odbc/odbc-api.lisp
+++ b/
db-odbc/odbc-api.lisp
@@
-151,7
+151,7
@@
as possible second argument) to the desired representation of date/time/timestam
(with-foreign-object (phenv 'sql-handle)
(with-error-handling
()
(with-foreign-object (phenv 'sql-handle)
(with-error-handling
()
- (SQLAlloc
Env
phenv)
+ (SQLAlloc
Handle $SQL_HANDLE_ENV +null-handle-ptr+
phenv)
(deref-pointer phenv 'sql-handle)))))
(%set-attr-odbc-version henv $SQL_OV_ODBC3)
henv))
(deref-pointer phenv 'sql-handle)))))
(%set-attr-odbc-version henv $SQL_OV_ODBC3)
henv))
@@
-164,9
+164,10
@@
as possible second argument) to the desired representation of date/time/timestam
(defun %new-db-connection-handle (henv)
(with-foreign-object (phdbc 'sql-handle)
(defun %new-db-connection-handle (henv)
(with-foreign-object (phdbc 'sql-handle)
+ (setf (deref-pointer phdbc sql-handle) +null-handle-ptr+)
(with-error-handling
(:henv henv)
(with-error-handling
(:henv henv)
- (SQLAlloc
Connect
henv phdbc)
+ (SQLAlloc
Handle $SQL_HANDLE_DBC
henv phdbc)
(deref-pointer phdbc 'sql-handle))))
(defun %free-statement (hstmt option)
(deref-pointer phdbc 'sql-handle))))
(defun %free-statement (hstmt option)
diff --git
a/db-odbc/odbc-constants.lisp
b/db-odbc/odbc-constants.lisp
index 591a3afa43fcc76c0f7a3f0df4e15bbd62652eae..e6cc0bdf6f56ed34dbaaab018cafd95ef35a6828 100644
(file)
--- a/
db-odbc/odbc-constants.lisp
+++ b/
db-odbc/odbc-constants.lisp
@@
-24,6
+24,13
@@
;; (defconstant $ODBCVER #x0210)
;; (defconstant $ODBCVER #x0210)
+
+;; for new SQLAllocHandle functiion
+(defconstant $SQL_HANDLE_ENV 1)
+(defconstant $SQL_HANDLE_DBC 2)
+(defconstant $SQL_HANDLE_STMT 3)
+(defconstant $SQL_HANDLE_DESC 4)
+
;; generally useful constants
(defconstant $SQL_SPEC_MAJOR 2) ;; Major version of specification
(defconstant $SQL_SPEC_MINOR 10) ;; Minor version of specification
;; generally useful constants
(defconstant $SQL_SPEC_MAJOR 2) ;; Major version of specification
(defconstant $SQL_SPEC_MINOR 10) ;; Minor version of specification
diff --git
a/db-odbc/odbc-ff-interface.lisp
b/db-odbc/odbc-ff-interface.lisp
index ba3362e9b3e2c49690ad570f30605ece7bdc5a52..7b780233db545f6a9abbe95054e7cd25fa00b43a 100644
(file)
--- a/
db-odbc/odbc-ff-interface.lisp
+++ b/
db-odbc/odbc-ff-interface.lisp
@@
-23,7
+23,15
@@
(def-foreign-type string-ptr '(* :unsigned-char))
(def-type long-ptr-type '(* #.$ODBC-LONG-TYPE))
(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
)
(def-function "SQLAllocEnv"
((*phenv sql-handle-ptr) ; HENV FAR *phenv
)
@@
-356,6
+364,15
@@
:module "odbc"
:returning :short)
:module "odbc"
: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)
(catalog-name :pointer-void)
(def-function "SQLTables"
((hstmt :pointer-void)
(catalog-name :pointer-void)
diff --git
a/db-odbc/odbc-sql.lisp
b/db-odbc/odbc-sql.lisp
index 385d378ee8adb9c084837503540e86f5775a2299..31d8a4ecd5692cba9324f68c395a6a978fb92715 100644
(file)
--- a/
db-odbc/odbc-sql.lisp
+++ b/
db-odbc/odbc-sql.lisp
@@
-52,6
+52,7
@@
;; underlying database
(initialize-database-type :database-type database-type)
db)
;; underlying database
(initialize-database-type :database-type database-type)
db)
+ #+ignore
(error () ;; Init or Connect failed
(error 'sql-connection-error
:database-type database-type
(error () ;; Init or Connect failed
(error 'sql-connection-error
:database-type database-type