Hi Bart, So what version of gdal/ogr would I have to upgrade to in order for this to work? Also, can I clarify- the "ID" in the CONFIG line, presumably that's the unique ID for my table. So in my case it's called "ProjectID". Does it need to be in capitals or should it be exactly as written in the database itself? Many thanks for your help Jo ------------------------------------------- Joanne Cook BSc MLitt AIFA Information Systems Coordinator Oxford Archaeology North -------------------------------------------
________________________________ From: Bart van den Eijnden [mailto:[EMAIL PROTECTED] Sent: Thu 24/11/2005 09:24 To: [email protected]; joanne cook Subject: Re: [UMN_MAPSERVER-USERS] problems querying ogr data source Hi Joanne, it was also recently posted on the gdal-dev list by Frank to me: 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, Bart Bart van den Eijnden Syncera IT Solutions Postbus 270 2600 AG DELFT tel.nr.: 015-7512436 email: [EMAIL PROTECTED] >>> joanne cook <[EMAIL PROTECTED]> 11/24/2005 10:08:34 AM >>> Hi Frank, Many thanks for the quick response. I should be able to upgrade to the nightly snapshot of gdal/ogr, but is there anywhere where I might find some information on the syntax of this config line? I had a look in the main mapserver and ogr/vrt documentation and couldn't find anything that specifically referred to it. All the best Jo ------------------------------------------- Joanne Cook BSc MLitt AIFA Information Systems Coordinator Oxford Archaeology North ------------------------------------------- ________________________________ From: [EMAIL PROTECTED] on behalf of Frank Warmerdam Sent: Wed 23/11/2005 17:13 To: joanne cook Cc: [email protected] Subject: Re: [UMN_MAPSERVER-USERS] problems querying ogr data source On 11/23/05, joanne cook <[EMAIL PROTECTED]> wrote: > Hi All, > > I have recently upgraded to Mapserver version 4.2.5, and have come across a > problem, that I'm fairly convinced I didn't have before the upgrade. I have a > layer in my map file that is an ogr connection via an ovf file to a microsoft > access database. I also have other standard layers based on shape files. When > I am in nquery mode and I query the layer based on the access database it > returns the top record from the database regardless of where on the map I am > clicking. If I choose more than one point then it returns more records, > working down from the first record in order. If I query an area with no > points, then I get the standard error message. When I query one of the other > layers the querying works properly. > > I would be very grateful for any thoughts that anyone has on this curious > situation! Jo, I suspect this is a problem with the OGR ODBC driver selecting a column as the feature id. If it ends up with the default mechanism of assigning feature ids sequentially to the result set, then you would see problems like the above. I don't know why it would have worked with an older mapserver. Are you in a position to upgrade to a nightly snapshot of GDAL/OGR? If so, you can add a CONFIG line to your map file to force selection of a particular column as fid. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
