Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MapGuide - Data type in SQL

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
345 Views, 5 Replies

MapGuide - Data type in SQL

Hi

I have a Layer in MapGuide that I want to link to an secondary table. The table is in SQL. Everything works fine if I select in the Name column one column but if I try to put together more than one column I get an error.

Autodesk MapGuide Server error: 529-X
Unable to retrieve data from layer XX. The query posed to data source XXX failed to execute. Invalid operator for data type. Operator equals boolean AND, type equals nvarchar..........

The data type from the SQL columns is the same (nvarchar) and the key column type in the MapGuide layer is a String.

If I connect to the same secondary table but instead of SQL I have it in Access it works OK.

I really need to let this work because I am taking all my access databases and putting them into SQL but I am constantly running into these errors.

With regards

Hallgrimur
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Hallgrimur, What are you using as a concatenator character to join the tow columns? SQL Server requires '+', while Access requires '&' (leave off the single quotes). HTH Carl "hallgrimur" wrote in message news:26369888.1098367612836.JavaMail.jive@jiveforum1.autodesk.com... > Hi > > I have a Layer in MapGuide that I want to link to an secondary table. The table is in SQL. Everything works fine if I select in the Name column one column but if I try to put together more than one column I get an error. > > Autodesk MapGuide Server error: 529-X > Unable to retrieve data from layer XX. The query posed to data source XXX failed to execute. Invalid operator for data type. Operator equals boolean AND, type equals nvarchar.......... > > The data type from the SQL columns is the same (nvarchar) and the key column type in the MapGuide layer is a String. > > If I connect to the same secondary table but instead of SQL I have it in Access it works OK. > > I really need to let this work because I am taking all my access databases and putting them into SQL but I am constantly running into these errors. > > With regards > > Hallgrimur
Message 3 of 6
Anonymous
in reply to: Anonymous

Hi

I knew it had to be something as simple as that. It works.


Thank you so very much.


With regards
Hallgrimur
Message 4 of 6
Anonymous
in reply to: Anonymous

I have a question and I'm hoping other might be abe to answer. I'm using Autodesk MapGuide Author 6.5 to create layers for a map. I currently use a spatial file and then a relational one as a secondary table. I'm encountering a problem with the SQL currently. It doesn't give an error message, but it's not doing what I need it too. There is more than one column I'm wanting the SQL to read and keep that data from appearing. If the column is 1st column is "NAME" and the second "STATS" Shouldn't I be able to say SQL

STATS = 'Open' AND NAME 'Western - iDCD- Sweden - Shelter'

Is not the correct symbol for doesn't equal or is that wrong? Cause what I want it to do is only show me data where the stats column equal open and the NAME column does not equal any of the listed 4? Thanks for any help? Both column types are characters if that helps too!
Message 5 of 6
Anonymous
in reply to: Anonymous

is it just the AND and should be + cause I've used and before efficiently
Message 6 of 6
Anonymous
in reply to: Anonymous

Try this:

STATS like 'Open' and NAME not in ('Western','iDCD','Sweden','Shelter')


--
Andy Morsell, P.E.
Spatial Integrators, Inc.
http://www.SpatialGIS.com

wrote in message news:5640597@discussion.autodesk.com...
I have a question and I'm hoping other might be abe to answer. I'm using
Autodesk MapGuide Author 6.5 to create layers for a map. I currently use a
spatial file and then a relational one as a secondary table. I'm
encountering a problem with the SQL currently. It doesn't give an error
message, but it's not doing what I need it too. There is more than one
column I'm wanting the SQL to read and keep that data from appearing. If
the column is 1st column is "NAME" and the second "STATS" Shouldn't I be
able to say SQL

STATS = 'Open' AND NAME 'Western - iDCD- Sweden - Shelter'

Is not the correct symbol for doesn't equal or is that wrong? Cause what I
want it to do is only show me data where the stats column equal open and the
NAME column does not equal any of the listed 4? Thanks for any help? Both
column types are characters if that helps too!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report