[gdal-dev] Can not connect with ODBC / DSN

Frank Warmerdam warmerdam at pobox.com
Tue Feb 5 14:19:34 EST 2008


Clay, Bruce wrote:
> I am trying to connect to an Oracle server using ODBC with a DSN style 
> connect string (ODBC:userName/password at dsnName).  It seems to be 
> connecting based on what I see in the debugger but does not return from 
> the OGRODBCDataSource::Open.  There is a loop inside the open that tries 
> to open every table in the database and that takes a very long time 
> since there are many house keeping tables in Oracle.  It has been 
> running several minutes and is up to 663 tables in the loop with an 
> unknown number remaining.
> 
>  
> 
> So the question is: should the following loop open every table in the 
> entire database with the above connect.

Bruce,

It is the expected behavior.  But you can specify a list of tables
in the ODBC connect string if you know what you want.  Then only
those tables will be enumerated as layers.   This is the normal
approach to databases with a lot of tables.

eg.
ODBC:user/password at dsn,table1,table2

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list