[mapguide-users] Maestro: can't find the table containing the geometry field with SQLServerSpatial

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Fri Oct 17 03:43:05 EDT 2008


Hi Carl.

Thank you for finding this problem.
There were another problem with the multiple schemas, namely that all 
tables would be assigned to the very first schema.
I have included you fix, the fix for multiple schemas, and the fix for 
the unmapped datatypes in r3392.
On my simple test setup, I can now use MsSql Spatial data, let me know 
if it works for you too.

Regards, Kenneth Skovhede, GEOGRAF A/S



Carl skrev:
> Exactly, the returned XML based on the new version of SQLSpatialProvider
> covers all tables.
> But now the root node name is changed to 'fdo:DataStore', and Maestro check
> that the root node name must be 'xs:schema'.  (as follows)
>
> ///////////////////////////////////
> public class FeatureSourceDescription
> 	{
> 		private FeatureSourceSchema[] m_schemas;
>
> 		public FeatureSourceDescription(System.IO.Stream stream)
> 		{
> 			XmlDocument doc = new XmlDocument();
> 			doc.Load(stream);
>
> 			if (doc.FirstChild.Name != "xml")
> 				throw new Exception("Bad document");
>
> 			if (doc.ChildNodes.Count != 2 || doc.ChildNodes[1].Name != "xs:schema")
> 				throw new Exception("Bad document");
>
> 			XmlNamespaceManager mgr = new XmlNamespaceManager(doc.NameTable);
> 			mgr.AddNamespace("xs", "http://www.w3.org/2001/XMLSchema");
> 			mgr.AddNamespace("gml", "http://www.opengis.net/gml");
> 			mgr.AddNamespace("fdo", "http://fdo.osgeo.org/schemas");
>
>             XmlNodeList lst =
> doc.SelectNodes("xs:schema/xs:complexType[@abstract='false']", mgr);
> 			m_schemas = new FeatureSourceSchema[lst.Count];
> 			for(int i = 0;i<lst.Count;i++)
> 				m_schemas[i] = new FeatureSourceSchema(lst[i], doc, mgr);
> 		}
> ......
>
> ///////////////////
>
> Then I changed the Maestro to fit the new version
> 1. Check the root node name : 'fdo:DataStore'
> 2. Modify the line
> XmlNodeList lst =
> doc.SelectNodes("xs:schema/xs:complexType[@abstract='false']", mgr);
>
> as 
>
> XmlNodeList lst =
> doc.SelectNodes("fdo:DataStore/xs:schema/xs:complexType[@abstract='false']",
> mgr);
>
> OK. It works well. all tables are listed, and the table containing a
> geometry field is shown as default.
>
>
> Brent Robinson-5 wrote:
>   
>> One clarification. The fix is specific to the handling of varchar(max) and
>> nvarchar(max). It likely doesn't address the problem mentioned at
>> http://www.nabble.com/Maestro%3A-can%27t-find-the-table-containing-the-geometry-field-with-SQLServerSpatial-tp19977173p19994687.html
>>
>> -----Original Message-----
>> From: mapguide-users-bounces at lists.osgeo.org
>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Brent
>> Robinson
>> Sent: Wednesday, October 15, 2008 12:37 PM
>> To: MapGuide Users Mail List
>> Subject: RE: [mapguide-users] Maestro: can't find the table containing the
>> geometry field with SQLServerSpatial
>>
>> This is a known defect that was fixed in July. The fix provides almost
>> full support for the varchar(max) and nvarchar(max) columns. There's one
>> limitation: when selecting from these columns, values longer than 16000
>> characters are truncated.
>>
>> The FDO 3.3.2 SQLServerSpatial provider should have the fix. It can be
>> obtained from the Windows SDK download at
>> http://fdo.osgeo.org/content/fdo-332-downloads. You'd just need to extract
>> the following DLL's:
>>
>>         SQLServerSpatialProvider.dll
>>         SQLServerSpatialOverrides.dll
>>         OSGeo.FDO.Providers.SQLServerSpatial.Overrides.dll
>>
>> to MapGuide's FDO bin directories:
>>
>>         Program Files\Autodesk\MapGuideEnterprise2009\Server\Bin\FDO
>>         Program Files\Autodesk\MapGuideStudio2009\FDO  (if present)
>>
>> I'd recommend saving copies of your current versions of these DLL's before
>> extracting, just in case.
>>
>> I have MG enterprise on my machine so your directories might look a bit
>> different.
>>
>> If you get a chance to try this out, please let me know if it fixes the
>> problem.
>>
>>
>> -----Original Message-----
>> From: mapguide-users-bounces at lists.osgeo.org
>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Carl
>> Sent: Wednesday, October 15, 2008 10:28 AM
>> To: mapguide-users at lists.osgeo.org
>> Subject: RE: [mapguide-users] Maestro: can't find the table containing the
>> geometry field with SQLServerSpatial
>>
>>
>> yes
>>
>>
>> Brent Robinson-5 wrote:
>>     
>>> Hi Carl,
>>>
>>> Do any of your tables have a varchar(max) column?
>>>
>>> Brent.
>>>
>>>
>>>
>>>       
>> --
>> View this message in context:
>> http://www.nabble.com/Maestro%3A-can%27t-find-the-table-containing-the-geometry-field-with-SQLServerSpatial-tp19977173p19994687.html
>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>     
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20081017/ff218b9f/attachment.html


More information about the mapguide-users mailing list