[mapguide-users] ExecuteSqlQuery on ODBC Data Source

Rahul unicorn_admirer at yahoo.com
Wed Sep 12 04:11:02 EDT 2007


Hi ,
        I tried to query the FeatureData Source (SQL Server 2005 view -odbc),
   
  
  $sql="select  ownername_th,epz_type,province_name_th from V_estates where estate_no=10";
          
              $featureResIdSql = new MgResourceIdentifier("Library://VV/Data/sql_odbc.FeatureSource");
   
 $sqlDataReader=$featureService->ExecuteSqlQuery($featureResIdSql,$sql);
  
         while($sqlDataReader->ReadNext())
  {
     $owner= $sqlDataReader->GetString('OWNERNAME_TH');
   $epz= $sqlDataReader->GetString('EPZ_TYPE');
   $province= $sqlDataReader->GetString('PROVINCE_NAME_TH');
   
  echo $owner;
  echo $epz;
  echo province;

  }
   
    $sqlDataReader->Close();
   
  Although i able to perfom sql query by passing ID and it use to give result from the SQL Server 2005 Views,and don't show any exception or error in the task frame but when i opened the Server Error Log file it use to create stack trace  for the error-An exception occurred in FDO component.

   
  <2007-09-12T14:43:59>    Administrator
 Error: An exception occurred in FDO component.
        Query ended 
 StackTrace:
  - MgFeatureServiceHandler.ProcessOperation line 83 file c:\build_bond_area\bond_nightly\build_41.3\ent\os\server\src\services\feature\FeatureServiceHandler.cpp
  - MgOpGetSqlRows.Execute line 102 file c:\build_bond_area\bond_nightly\build_41.3\ent\os\server\src\services\feature\OpGetSqlRows.cpp
  - MgServerSqlProcessor.GetRows line 79 file c:\build_bond_area\bond_nightly\build_41.3\ent\os\server\src\services\feature\ServerSqlProcessor.cpp
  - MgServerSqlDataReader.ReadNext line 76 file c:\build_bond_area\bond_nightly\build_41.3\ent\os\server\src\services\feature\ServerSqlDataReader.cpp An exception occurred in FDO component.
Query ended 

I am unable to understand how to debug this error or what i am missing in the code.
   
  Thks
  Max

       
---------------------------------
Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV.    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070912/9300cb46/attachment.html


More information about the mapguide-users mailing list