[gdal-dev] Re: SDE connection string problem with 1.6.1?

bartvde at osgis.nl bartvde at osgis.nl
Fri Aug 7 05:20:42 EDT 2009


Okay, at least 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 at hades nappub_svn]$ ogrinfo -ro
SDE:geodatabase.ad.rws.nl,5151,PGPR,RWS_LEZEN,RWS_LEZEN,WEGEN.WEGEN_NWB_LIGHT,SDE.DEFAULT
INFO: Open of
`SDE:geodatabase.ad.rws.nl,5151,PGPR,RWS_LEZEN,RWS_LEZEN,WEGEN.WEGEN_NWB_LIGHT,SDE.DEFAULT'
      using driver `SDE' successful.
1: WEGEN.WEGEN_NWB_LIGHT


Best regards,
Bart

> An update on this issue. This is a bug and is still present in 1.6.2
> unfortunately.
>
> 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;
>         }
>
>     }
>
> Best regards,
> Bart
>
>> Hi list,
>>
>> it seems the layer part of an SDE connection string is not picked up
>> anymore. We're using GDAL 1.6.1. Did anybody else experience this?
>>
>> E.g.:
>>
>> ogrinfo
>> SDE:geodatabase.ad.rws.nl,5151,5151,RWS_LEZEN,****,WEGEN.WEGEN_NWB_LIGHT
>>
>> lists all tables and not only the one specified.
>>
>> TIA.
>>
>> Best regards,
>> Bart
>>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list