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

Brent Robinson brent.robinson at autodesk.com
Wed Oct 15 10:00:10 EDT 2008


Hi Carl,

Do any of your tables have a varchar(max) column?

Brent.

-----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 8:06 AM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] Maestro: can't find the table containing the geometry field with SQLServerSpatial


sometimes, while I choose the featuresoure, follow message is shown and
Maestro stops. But if I re-choose the same featuresource, it works without
any message:

Failed to read schema from data source.
The operation gave the error message: remote server return error: (559)
MgFdoException.:
An Exception occurred in FDO component.
Invalid length -1 for column type varchar, must be %gt;=0
Exception occurred in method
MgServerDescribeSchema.ExecuteDescribeSchema at line 176 in file
d:\buildforgeprojects\mapguide_open_source_v2.0\build_23.8\mgdev\server\src\services\feature\ServerDescribeSchema.cpp


Kenneth Skovhede, GEOGRAF A/S wrote:
>
> I guess there should be an "unmapped type" - type, to deal with
> situations like this.
> You can set it to "string", and it should read out just fine.
> I have created a ticket for the problem:
> http://trac.osgeo.org/mapguide/ticket/724
>
> As you may have noticed, Maestro issues calls to a web interface on the
> MapGuide server:
> http://localhost/mapguide/mapagent/index.html
>
> On this test form/web interface, you can try the "Feature" ->
> "DescribeSchema".
> Leave the "Schema" field blank, and you will get the output from
> MapGuide, which in turn should be
> the output directly from FDO.
>
> If the tables are missing there, you cannot get them into Maestro.
> If the tables are present, please file a bug report for Maestro, and
> include the resulting xml in the ticket.
>
> If the tables are missing (which I suspect), it could be a problem with
> permissions.
> Could it be that the provider only shows tables which are owned by the
> login user?
>
> Regards, Kenneth Skovhede, GEOGRAF A/S
>
>
>
> Carl skrev:
>> yes, the exception is exactly fired because of the lost the type map.
>>
>> Then I tried to comment the follow bold line:
>>
>> /////////////////////////////////////////
>> public class FeatureSetColumn
>>      {
>>              internal FeatureSetColumn(string name, int type)
>>              {
>>                      m_name = name;
>>                      m_type = Utility.ConvertMgTypeToNetType(type);
>>              }
>>
>>              internal FeatureSetColumn(XmlNode node)
>>              {
>>                      m_name = node.Attributes["name"].Value;
>>                      m_allowNull = node.Attributes["minOccurs"] != null &&
>> node.Attributes["minOccurs"].Value == "0";
>>             if (node.Attributes["type"] != null &&
>> node.Attributes["type"].Value == "gml:AbstractGeometryType")
>>                 m_type = Utility.GeometryType;
>>             else if (node["xs:simpleType"] == null)
>>                 m_type = Utility.RasterType;
>>             else
>>                 switch
>> (node["xs:simpleType"]["xs:restriction"].Attributes["base"].Value.ToLower())
>>                 {
>>                     case "xs:string":
>>                         m_type = typeof(string);
>>                         break;
>>                     case "fdo:byte":
>>                         m_type = typeof(Byte);
>>                         break;
>>                     case "fdo:int32":
>>                         m_type = typeof(int);
>>                         break;
>>                     case "fdo:int16":
>>                         m_type = typeof(short);
>>                         break;
>>                     case "fdo:int64":
>>                         m_type = typeof(long);
>>                         break;
>>                     case "xs:float":
>>                         m_type = typeof(float);
>>                         break;
>>                     case "xs:double":
>>                     case "xs:decimal":
>>                         m_type = typeof(double);
>>                         break;
>>                     case "xs:boolean":
>>                         m_type = typeof(bool);
>>                         return;
>>                     case "xs:datetime":
>>                         m_type = typeof(DateTime);
>>                         break;
>>                     default:
>>                         //throw new Exception("Failed to find appropriate
>> type for: " +
>> node["xs:simpleType"]["xs:restriction"].Attributes["base"].Value);
>> break;
>>                 }
>>              }
>>
>>              private string m_name;
>>              private Type m_type;
>>              private bool m_allowNull;
>>
>>              public string Name { get { return m_name; } }
>>              public Type Type { get { return m_type; } }
>>      }
>>
>> //////////////////////////////////
>>
>> OK. No messages shown again, and Maestro seems work normally, the
>> resource
>> editor can show more information.
>>
>> But, there still only 16 tables listed, none has a geometry field. In
>> fact
>> there exist more than 200 tables in the Database.
>>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>

--
View this message in context: http://www.nabble.com/Maestro%3A-can%27t-find-the-table-containing-the-geometry-field-with-SQLServerSpatial-tp19977173p19992149.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


More information about the mapguide-users mailing list