Thanks for you prompt response Tamas! Well, after having used the ogrinfo tool (thanks for the hint - first time user of ogr/gdal you see), I tested the connection string mutliple times - and it turns out it was because I was using Initial Catalog parameter, instead of the Database parameter.
So - handy hint for the day - Don't use the Initial Catalog parameter in your SQL Server 2008 connection string with OGR. Use the Database parameter. Cheers Tamas! On Sun, Jan 23, 2011 at 11:05 PM, Tamas Szekeres <[email protected]>wrote: > Matthew, > > Could you provide a sample data to reproduce this problem? > How the layer and the features are displayed by the ogrinfo command tool? > > Best regards, > > Tamas > > > > > 2011/1/23 Matthew Blackler <[email protected]> > >> Dear all, >> >> I have downloaded v1.8.0 and am using .net CSharp bindings to connect into >> MSSQL such: >> >> "MSSQL:SERVER=MATT-ACERPC\\SQLExpress;tables=categ(geom);Initial >> Catalog=Crown_GIS;Integrated Security=True"; >> >> I am able to connect and retrieve the driver ok. I am able to get the >> Layer "Categ" from the datasource, no problem. However, the extent of the >> layer, feature counts, and even the "get" of features using the nextfeature >> cursor fails to retrieve any features or information for me. >> >> Any obvious pointers as to why iterating through a layer with a known >> number of features (4,000 ish) would result in returning nothing (i.e. no >> feature back from the getnextfeature), or why the extent of a layer would be >> reported as being 0,0,0,0? >> >> Any help would be much appreciated. Looking forward to leveraging OGR to >> making our apps datasource independant, and throwing away the shackles of >> ArcObjects! >> >> Thanks in advance, >> >> Matthew Blackler >> >> -- >> Email: [email protected] >> Homepage: http://www.mattblackler.com >> Twitter: @mattblacklercom >> >> >> >> _______________________________________________ >> gdal-dev mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/gdal-dev >> > > -- Email: [email protected] Homepage: http://www.mattblackler.com Twitter: @mattblacklercom
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
