<div>Hi Ronnie,</div> <div> I am trying to pass filter on the feature source (Primary) joined with SQL database,I tried to check some name and used the wild card Like statement.</div> <div> </div> <div><STRONG>$filter="TNAME LIKE '"."%".$name."%'";</STRONG></div> <div> </div> <div>It use to give results when i send some correct parameters ie name but when i type anything and use search button it use to crash my <STRONG>MapGuide2008 Server</STRONG> instead of giving that <STRONG>0 Results found try again</STRONG>,same thing i tried on MGOS1.2 and if i send right string it use to search and if i send anything then it use to give<STRONG> 0 results found try again</STRONG> with out crashing the MapGuide Server.</div> <div> </div> <div>I unable to understand the strange behaviour between the two or anything to do with the joined fature source that is causing
problem.Looking forward for your kind reply.</div> <div> </div> <div>Thks</div> <div>Max</div> <div> </div> <div><BR><BR><B><I>Ronnie Louie <ronnie.louie@autodesk.com></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <META content="Microsoft Word 12 (filtered medium)" name=Generator> <STYLE> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </STYLE> <STYLE> <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} @font-face {font-family:CourierNewPSMT;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink
{mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p {mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; font-size:12.0pt; font-family:"Times New Roman","serif";} span.EmailStyle18 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle19 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.Section1 {page:Section1;} --> </STYLE> <DIV class=Section1> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Hi Max,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></div>
<div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">The exception message resulting from line 403 of mapguidecommon/Services/ProxyGwsFeatureReader.cpp tells me that the filter value is expecting an integer type, and you have actually passed it a double. Try modifying your script so that the line that reads $n=$name+0.0 is changed to $n=$name.<o:p></o:p></SPAN></div> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Ronnie<o:p></o:p></SPAN></div> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div> <DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none"> <div class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> Rahul [mailto:unicorn_admirer@yahoo.com] <BR><B>Sent:</B> Thursday, September 06, 2007 9:18 PM<BR><B>To:</B> MapGuide Users Mail List<BR><B>Subject:</B> RE: [mapguide-users] SDF & SQL Server 2005 Joined Feature Source<o:p></o:p></SPAN></div></DIV> <div class=MsoNormal><o:p> </o:p></div> <DIV> <div class=MsoNormal>Hi Ronnie,<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> Thanks for your kind reply,Actually first i tried to work with SQL Server 2005
and storing Geometry data using Map3D2008 and i manage to create datastore and edit,delete update etc from Map3D 2008 then i tried to use it for the web and tried to theme and modify using the ADSK Mapguide studio 2008 but here the problem start arising and i unable to get the properties and other things in the mapguide studio although i able to manage connection ang get new feature classes etc but unable to view and when i try to change some themeing condition it use to give error that some table doesn not exists although i can easily work with map3D 2008 with the same table,so then i tried to work with SDF and joined the SDF file with SQL server2005 Views and i tried to query but as you told that it will filter only on primary source of join so i tried to set filter on the primary source of the joined feature source,<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV> <DIV> <div class=MsoNormal>$name =
trim($_GET['sDeed']);<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> <BR> if (strlen($name) > 0 )<BR> {<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> <BR> $n=$name+0.0; <BR> <BR> echo gettype($n);---------------------->Double<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> $filter="ID=".$n; <BR> <o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> $featureResId = new MgResourceIdentifier("Library://ABC/Data/Estates.FeatureSource");<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal><BR> $queryOptions = new
MgFeatureQueryOptions();<BR> $queryOptions->SetFilter($filter);<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV> <DIV> <div class=MsoNormal>This use to give the following error in the joined feature source with filter on primary source-<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV> <DIV> <div class=MsoNormal><SPAN style="COLOR: #bf005f">Double</SPAN><o:p></o:p></div></DIV> <DIV> <TABLE class=MsoNormalTable style="WIDTH: 100%" cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt"> <div class=MsoNormal><SPAN style="COLOR: #bf005f">ID=1The Property Type is invalid.The Property Type is invalid. Exception occurred in method MgProxyGwsFeatureReader.GetProperty at line 403 in file
c:\build_bond_area\bond_nightly\build_41.3\ent\os\common\mapguidecommon\Services/ProxyGwsFeatureReader.cpp</SPAN> <o:p></o:p></div></TD></TR></TBODY></TABLE></DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV> <DIV> <div class=MsoNormal>but when i use the same filter on the SDF File(not Joined) it use to give me the result ,so can you tell me what i am missing or doing wrong and how can i proceed with working SQL Server 2005 and Autodesk MapGuide Studio 2008.<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV> <DIV> <div class=MsoNormal>Thanks<o:p></o:p></div></DIV> <DIV> <div class=MsoNormal>Max<BR><BR><B><I>Ronnie Louie <ronnie.louie@autodesk.com></I></B> wrote:<o:p></o:p></div></DIV> <BLOCKQUOTE style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; MARGIN-TOP: 5pt; PADDING-LEFT: 4pt; MARGIN-BOTTOM: 5pt; PADDING-BOTTOM: 0in; MARGIN-LEFT: 3.75pt; BORDER-LEFT: #1010ff 1.5pt solid;
PADDING-TOP: 0in; BORDER-BOTTOM: medium none"> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Hi Max,<o:p></o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">When you have join of SDF to SQL Server feature source, you can only define a filter for the fields from the primary source of the join (i.e. the properties in the SDF). It is not currently possible to setup a filter for the secondary feature source of a join (i.e. the SQL Server datasource properties). Depending on what you a trying to achieve, you may be able to get similar desired result by setting up an appropriate theme based on the properties from the secondary feature source.<o:p></o:p></SPAN></div></DIV>
<DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Ronnie<o:p></o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></div></DIV> <DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none"> <DIV> <div class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> Rahul
[mailto:unicorn_admirer@yahoo.com] <BR><B>Sent:</B> Thursday, September 06, 2007 3:27 AM<BR><B>To:</B> MapGuide Users Mail List<BR><B>Subject:</B> [mapguide-users] SDF & SQL Server 2005 Joined Feature Source<o:p></o:p></SPAN></div></DIV></DIV> <DIV> <div class=MsoNormal><o:p> </o:p></div></DIV> <DIV> <DIV> <div class=MsoNormal>Hi All,<o:p></o:p></div></DIV></DIV> <DIV> <DIV> <div class=MsoNormal> I tried to join the SDF faeture source spatial data with the SQL Server 2005 Views(non spatial data) ,I manage to get the new joined feature source and get the attributes in the property pane but i stuck in the Search criteria and when i tried to search the joined feature class using the filter like -<o:p></o:p></div></DIV></DIV> <DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV></DIV> <DIV> <DIV> <div class=MsoNormal>$filter ="LU_STATUS = '" . $status ."'"." and " .
"PD_GROUP= '".$group."'"." and " . "SHAREHOLDE= '".$share."'"." or " . "PROMOTION= '".$plan."'";<o:p></o:p></div></DIV></DIV> <DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: CourierNewPSMT">$queryOptions = new MgFeatureQueryOptions();<o:p></o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: CourierNewPSMT">$queryOptions->SetFilter($filter);<o:p></o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: CourierNewPSMT"> <o:p></o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-FAMILY: CourierNewPSMT">I unable to get any values and it use to give no search found.Can anybody help me regarding this issue and where i can get some detail for working with SQL commands on the feature source ,i tried in the mapagent some basic sql commands but it use to give error and
i cannot find the way to go with them.</SPAN><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: CourierNewPSMT"><o:p></o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: CourierNewPSMT"> <o:p></o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: CourierNewPSMT">Thanks<o:p></o:p></SPAN></div></DIV> <DIV> <div class=MsoNormal><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: CourierNewPSMT">Max<o:p></o:p></SPAN></div></DIV> <DIV> <DIV> <div class=MsoNormal><BR><BR> <o:p></o:p></div></DIV></DIV> <DIV> <div class=MsoNormal> <o:p></o:p></div></DIV> <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center> <HR align=center width="100%" SIZE=1> </DIV> <DIV> <div class=MsoNormal>Yahoo! oneSearch: Finally, <A href="http://us.rd.yahoo.com/evt=48252/*http:/mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC">mobile search that gives answers</A>, not web links.
<o:p></o:p></div></DIV> <div class=MsoNormal>_______________________________________________<BR>mapguide-users mailing list<BR>mapguide-users@lists.osgeo.org<BR>http://lists.osgeo.org/mailman/listinfo/mapguide-users<o:p></o:p></div></BLOCKQUOTE> <div class=MsoNormal><o:p> </o:p></div> <div> <o:p></o:p></div> <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center> <HR align=center width="100%" SIZE=1> </DIV> <div class=MsoNormal>Moody friends. Drama queens. Your life? Nope! - their life, your story.<BR><A href="http://us.rd.yahoo.com/evt=48224/*http:/sims.yahoo.com/">Play Sims Stories at Yahoo! Games. </A><o:p></o:p></div></DIV>_______________________________________________<BR>mapguide-users mailing list<BR>mapguide-users@lists.osgeo.org<BR>http://lists.osgeo.org/mailman/listinfo/mapguide-users<BR></BLOCKQUOTE><BR><p> 
<hr size=1>Moody friends. Drama queens. Your life? Nope! - their life, your story.<br> <a href="http://us.rd.yahoo.com/evt=48224/*http://sims.yahoo.com/">Play Sims Stories at Yahoo! Games. </a>