r9089: Automated commit for Debian build of clsql upstream-version-2.8.1
[clsql.git] / db-odbc / odbc-dbi.lisp
index 9ebbaad5bb1499bb03ebbc0c89cff882734c1405..8aa0b07c6faefae5ea4772b167f8f1c9cf039850 100644 (file)
@@ -30,6 +30,7 @@
    #:disconnect
    #:end-transaction
    #:fetch-row
+   #:list-all-data-sources
    #:list-all-database-tables
    #:list-all-table-columns
    #:loop-over-results
@@ -183,6 +184,12 @@ the query against." ))
   (declare (ignore hstmt))
   (db-describe-columns db "" "" table ""))
 
+(defun list-all-data-sources ()
+  (let ((db (make-instance 'odbc-db)))
+    (unless (henv db) ;; has class allocation!
+      (setf (henv db) (%new-environment-handle)))
+    (%list-data-sources (henv db))))
+
 (defun rr-sql (hstmt sql-statement &key db)
   (declare (ignore hstmt sql-statement db))
   (warn "rr-sql not implemented."))