[Gdal-dev] specifying FID in connection string

Frank Warmerdam warmerdam at pobox.com
Tue Nov 22 09:33:13 EST 2005


On 11/22/05, Bart van den Eijnden <BEN at syncera-itsolutions.nl> wrote:
> Hi list,
>
> there seem to be occassional problems with the detection of a primary key using ODBC, I have experienced it using Access and now Oracle. Would it be an idea to be able to optionally specify the FID column in the connection string? I think that would solve a lot of issues.
>
> Using my Oracle view I now get:
>
> OGR_ODBC: Table V_BIS_LOC has no identified FID column.
>
> I also tried using the geometry table by itself, and still no FID column could be recognized. Then I tried specifying a primary key constraint on the view with Oracle SQL, but still no FID recognition.
>
> What do people think about this? For my applications it is quite crucial that a primary key is recognized, since otherwise Mapserver queries won't run reliably.

Bart,

A few days ago I added a mechanism to specify the name of
the FID column using the ODBC_OGR_FID configuration variable.

So, in a mapfile you could put:

CONFIG "ODBC_OGR_FID" "ID"

However, this is a global setting, not layer specific.  If this
won't do the trick, let me know and I will add a way to specify
the FID along with the tablename in the datasource name.

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list