[mapguide-users] SDF & SQL Server 2005 Joined Feature Source

Rahul unicorn_admirer at yahoo.com
Tue Sep 11 01:22:08 EDT 2007


Hi Ronnie,
                  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.
   
  $filter="TNAME LIKE '"."%".$name."%'";
   
  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 MapGuide2008 Server instead of giving that 0 Results found try again,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 0 results found try again with out crashing the MapGuide Server.
   
  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.
   
  Thks
  Max
   
  

Ronnie Louie <ronnie.louie at autodesk.com> wrote:
        v\:* {behavior:url(#default#VML);}  o\:* {behavior:url(#default#VML);}  w\:* {behavior:url(#default#VML);}  .shape {behavior:url(#default#VML);}                Hi Max,
   
  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.
   
  Ronnie
   
    From: Rahul [mailto:unicorn_admirer at yahoo.com] 
Sent: Thursday, September 06, 2007 9:18 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] SDF & SQL Server 2005 Joined Feature Source

   
    Hi Ronnie,

     

                   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,

     

    $name = trim($_GET['sDeed']);

            
        if (strlen($name) > 0 )
        {

             
   $n=$name+0.0; 
    
   echo gettype($n);---------------------->Double

     

       $filter="ID=".$n; 
           

        $featureResId = new MgResourceIdentifier("Library://ABC/Data/Estates.FeatureSource");

    
            $queryOptions = new MgFeatureQueryOptions();
            $queryOptions->SetFilter($filter);

     

    This use to give the following error in the joined feature source with filter on primary source-

     

    Double

            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 

     

    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.

     

    Thanks

    Max

Ronnie Louie <ronnie.louie at autodesk.com> wrote:

      Hi Max,

     

    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.

     

    Ronnie

     

     

      From: Rahul [mailto:unicorn_admirer at yahoo.com] 
Sent: Thursday, September 06, 2007 3:27 AM
To: MapGuide Users Mail List
Subject: [mapguide-users] SDF & SQL Server 2005 Joined Feature Source


     

      Hi All,


                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 -


       


      $filter ="LU_STATUS = '" . $status ."'"." and " . "PD_GROUP= '".$group."'"." and " . "SHAREHOLDE= '".$share."'"." or " . "PROMOTION= '".$plan."'";


       


    $queryOptions = new MgFeatureQueryOptions();

    $queryOptions->SetFilter($filter);

     

    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.

     

    Thanks

    Max

      

 


      

    
---------------------------------
  
    Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. 

  _______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
   
    
    
---------------------------------
  
  Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games. 

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


       
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070910/09811faf/attachment.html


More information about the mapguide-users mailing list