[gdal-dev] MSSQL GDAL 1.8.0 Feature problem

Tamas Szekeres szekerest at gmail.com
Mon Jan 24 10:10:15 EST 2011


Yes, it seems the ODBC SQL driver doesn't support the 'Initial Catalog'
parameter. I've modified the driver documentation accordingly.

Best regards,

Tamas




2011/1/24 Matthew Blackler <matt at mattblackler.com>

> 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 <szekerest at gmail.com>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 <matt at mattblackler.com>
>>
>>>  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: matt at mattblackler.com
>>> Homepage: http://www.mattblackler.com
>>> Twitter: @mattblacklercom
>>>
>>>
>>>
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>>
>
>
> --
> Email: matt at mattblackler.com
> Homepage: http://www.mattblackler.com
> Twitter: @mattblacklercom
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110124/aca9eaf1/attachment.html


More information about the gdal-dev mailing list