Opened 15 years ago

Closed 9 years ago

#3096 closed defect (fixed)

SDE driver does not recognize table anymore

Reported by: bartvde Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

This used to work in GDAL 1.5 but does not work in 1.6.1 or 1.6.2.

A ogrinfo call like the following:

ogrinfo SDE:geodatabase.ad.rws.nl,5151,PGPR,RWS_LEZEN,****,WEGEN.WEGEN_NWB_LIGHT

lists all tables and not only the one specified.

The problem is in ogrsdedatasource.cpp, where the else clause which lists all spatial tables was moved down, so it now corresponds to a different if clause.

old code:

    if ( CSLCount( papszTokens ) == 6 && *papszTokens[5] != '\0' )
    {
        OpenSpatialTable( papszTokens[5] );
    }
    else
    {
        EnumerateSpatialTables();
    }

new code:

    else if ( CSLCount( papszTokens ) == 8 && *papszTokens[7] != '\0' )
    {
        ....
    }
    else
    {
        CPLDebug("OGR_SDE", "Setting version to SDE.DEFAULT");
        nSDEErr = SetVersionState("SDE.DEFAULT");
        EnumerateSpatialTables();
        if (!nSDEErr)
        {
            // We've already set the error
            CSLDestroy( papszTokens );
            return FALSE;
        }

    }

There is a workaround for this issue, by opening the dataset in read-only mode and specifying the version (which causes the else loop not to be reached):

[bart@hades nappub_svn]$ ogrinfo -ro SDE:geodatabase.ad.rws.nl,5151,PGPR,RWS_LEZEN,****,WEGEN.WEGEN_NWB_LIGHT,SDE.DEFAULT INFO: Open of `SDE:geodatabase.ad.rws.nl,5151,PGPR,RWS_LEZEN,***,WEGEN.WEGEN_NWB_LIGHT,SDE.DEFAULT'

using driver `SDE' successful.

1: WEGEN.WEGEN_NWB_LIGHT

Change History (2)

comment:1 by Jukka Rahkonen, 9 years ago

Hi bartvde, five years have passed by. Could you check if recent GDAL versions can recognize SDE tables and hopefully close the ticket?

comment:2 by bartvde, 9 years ago

Resolution: fixed
Status: newclosed

I am not so involved anymore in GDAL so I have no access to ArcSDE anymore so I'll close this.

Note: See TracTickets for help on using tickets.