On 23-Feb-2005 Walter Obermiller wrote:
> Martin,
> 
> New deck of cards. I have completely cleaned out the perl-odbc 
> environment and replaced it with:
> 
> 
> Unixodbc 2.2.10 (configured without threading enabled)
> perl 5.8.6      (unthreaded)
> DBI-1.47
> DBD::ODBC 1.13  (configured for 5.8.6 and unixodbc2.2.10)
> 
> unixODBC 2.2.10
> DRIVERS............: /usr/local/etc/odbcinst.ini
> SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
> USER DATA SOURCES..: /home/users/walter/.odbc.ini
> 
> ------------------------------------------
> [MySQL]
> Description = ODBC for MySQL
> Driver = /usr/lib/unixODBC/libmyodbc3.so
> FileUsage = 1
> 
> [AdabasD]
> Description = AdabasD -Driver
>#Driver = /home2/OpenOffice.org1.1.3/program/libadabas2.so
> Driver = /usr/local/lib/odbclib.so
> DontDLClose=1
> 
> [ODBC]
> Trace = Yes
> ----------------------------------------
> 
> running my time-honored test program:
> 
> -----trivial connect---------
>#!/usr/local/bin/perl -w
> my $dbh = DBI->connect('dbi:ODBC:DSN=emanuel-sbart;UID=walter;PWD=**;') 
>||           die "can't connect to $data_source: $DBI::errstr";
> $rc = $dbh->disconnect;
> exit();
> -----------------------------
> 
> results in the  error:
> ------------------------dbitrace.log--------------------------------
> Driver connect 'DSN=emanuel-sbart;UID=walter;PWD=**;', '', 'xxxx'
> dbd_error: err_rc=-1 rc=0 s/d/e: 0/136851792/136850368
> dbd_error: SQL-IM001 (native 0): [unixODBC][Driver Manager]Driver does 
> not support this fu
> nction (SQL-IM001)
> dbd_error: err_rc=-1 rc=0 s/d/e: 0/0/136850368
> dbd_db_login/SQLGetInfo(DRIVER_ODBC_VER) error -1 recorded: 
> [unixODBC][Driver Manager]Driv
> er does not support this function (SQL-IM001)(DBD: 
> dbd_db_login/SQLGetInfo(DRIVER_ODBC_VER
> ) err=-1)
> Connected to: Unknown/Unsupported
>         SQLGetFunctions - SQL_MoreResults supported: 0
> ------------------------dbitrace.log--------------------------------------
> 
> 
> Could this be a problem with the ODBC-Level ?
> 
>       -walt

But did it connect?

I see the Driver connect line looks correct now:
  'DSN=emanuel-sbart;UID=walter;PWD=**;'

Neither of other two should matter:
   rc = SQLGetInfo(imp_dbh->hdbc, SQL_DRIVER_ODBC_VER, &imp_dbh->odbc_ver,
                   (SWORD) sizeof(imp_dbh->odbc_ver), &dbvlen);
   if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO)
   {
      YOU GOT HERE - just affetcs the odbc_ver reported to your perl
      should it ask.
      dbd_error(dbh, rc, "dbd_db_login/SQLGetInfo(DRIVER_ODBC_VER)");
      strcpy(imp_dbh->odbc_ver, "01.00");
   }

unless unixODBC doesn't like a driver not saying what ODBC version it is - I
doubt it.

and:

   rc = SQLGetFunctions(imp_dbh->hdbc, SQL_API_SQLMORERESULTS, 
                        &supported);
   if (ODBC_TRACE_LEVEL(imp_dbh) >= 3)
      PerlIO_printf(DBIc_LOGPIO(imp_dbh), "       SQLGetFunctions -
SQL_MoreResults supported: %d\n", 
                    supported);
   if (SQL_ok(rc)) {
      imp_dbh->odbc_sqlmoreresults_supported = supported ? 1 : 0;
   } else {

Just means you can use odbc_more_results method.

Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development

Reply via email to