Phillip Hellewell wrote:

> Hello,
>       I'm using DBI and DBD:ODBC in my perl script.  I'm also using
> DBI::Const::GetInfoType.  I was trying to get the database name using
> $dbh->get_info( $GetInfoType{SQL_DATABASE_NAME} ), and it returned 0,
> but $dbh->get_info( 16 ) worked!  So I looked in
> lib/DBI/Const/GetInfo/ODBC.pm, and sure enough, it is missing a case for
> 16 in the %InfoTypes hash.  This is the version of the ODBC.pm file I am
> using:
>
> # $Id: ODBC.pm,v 1.3 2003/02/26 17:56:01 timbo Exp $
>
>       Is my file outdated, or was SQL_DATABASE_NAME just left out by
> accident?  Was it left out on purpose?

At that time I decided to omit this deprecated #define in sqlext.h:

  /*      Deprecated defines from prior versions of ODBC */
  #define SQL_DATABASE_NAME               16    /* Use 
SQLGetConnectOption/SQL_CURRENT_QUALIFIER */

Attached is a patch - if Tim likes it?


Steffen
--- ODBC.orig   Wed Feb 26 18:56:36 2003
+++ ODBC.pm     Mon Jan 24 13:42:33 2005
@@ -99,6 +99,7 @@
 , SQL_CURSOR_SENSITIVITY              => 10001
 , SQL_DATA_SOURCE_NAME                =>     2
 , SQL_DATA_SOURCE_READ_ONLY           =>    25
+, SQL_DATABASE_NAME                   =>    16 
 , SQL_DATETIME_LITERALS               =>   119
 , SQL_DBMS_NAME                       =>    17
 , SQL_DBMS_VER                        =>    18

Reply via email to