<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags"
xmlns:s="library://ns.adobe.com/flex/spark"
pageTitle="Query Task (without a map)">
<!--
This sample shows how to query the server and displaying
the result in a datagrid.
The query is sent using the execute() method on a QueryTask.
This sample sets up a QueryTask (what layer on what server to query).
When the user clicks the "Get Details" button, a Query is sent with
the user-provided text to search for.
Meanwhile a DataGrid has been created which listens for the results
(using executeLastResult) from the querytask.
-->
<s:layout>
<s:VerticalLayout horizontalAlign="center" paddingTop="25"/>
</s:layout>
<fx:Declarations>
<esri:QueryTask id="queryTask"
url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5"
useAMF="false"/>
<esri:Query id="query"
outFields="[STATE_NAME,STATE_FIPS,SUB_REGION,STATE_ABBR,POP2000,POP2007]"
returnGeometry="false"
text="{stateName.text}"/>
</fx:Declarations>
<s:Panel title="Using Query tasks without maps">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<s:HGroup verticalAlign="middle">
<s:Label text="US state name: "/>
<s:TextInput id="stateName" text="Carolina"/>
<s:Button click="queryTask.execute(query);" label="Get Details"/>
</s:HGroup>
<mx:DataGrid id="resultsGrid"
dataProvider="{queryTask.executeLastResult.attributes}"
visible="{queryTask.executeLastResult != null}">
<mx:columns>
<mx:DataGridColumn dataField="STATE_NAME" headerText="State Name"/>
<mx:DataGridColumn dataField="SUB_REGION" headerText="Region"/>
<mx:DataGridColumn dataField="STATE_FIPS" headerText="FIPS"/>
<mx:DataGridColumn dataField="STATE_ABBR" headerText="Abbreviation"/>
<mx:DataGridColumn dataField="POP2000" headerText="Population 2000"/>
<mx:DataGridColumn dataField="POP2007" headerText="Population 2007"/>
</mx:columns>
</mx:DataGrid>
</s:Panel>
</s:Application>
注:Query里面的属性text真正的查询条件是,featuryLayer里的Display field = '%text%'
![点击查看原始大小图片](http://dl2.iteye.com/upload/attachment/0059/0104/78aa4af4-fdcc-370b-b3b8-94de57cfae54-thumb.jpg)
- 大小: 6.9 KB
分享到:
相关推荐
Ideally adapter should only retrieve the poll quantity number of events from the event table, since retrieving all the records into the resultset increases the memory foot-print and also puts pressure...
(c) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (d) writing an English description of the data that the user...
If the table is a heap (in other words, it has no clustered index), the bookmark is a RID, which is an actual row locator in the form File#:Page#:Slot#. Finding Rows with a NC Index on a Heap ...
There is one large table per query. All tables are small, except for one. A query result is significantly smaller than the source data. In other words, data is filtered or aggregated, so the result ...
// Now try to execute the query and display the results in a table Statement statement = null; // An object to execute the query try { // Create a statement to use statement = db....
$query = "SELECT * FROM $table WHERE session='$session' AND product='$product' "; $result = mysql_query($query); if(!$result) { return 0; } $numRows = mysql_num_rows($result); if($...
查询HyperLEDA(query.hyperleda) 从HyperLEDA Web数据访问服务查询(注意:... query_object ( 'UGC12591' , properties = 'all' )>> > print ( result_table ) # an astropy.table.Table pgc objname objtype ... c
-Now result parameter detection in UniConnection.ExecSQL is similar to the one in ODAC -Bug with connection establishing if the client has negative half-hour time zone is fixed -Bug with transactions ...
to-run PHP functions for solving most of the main problems you encounter when building a dynamic website with PHP. Every plug-in in the book offers a complete and working solution for a result you can...
In the file Rel-ops.txt, list which relational operations you used, from among the select/project/join operations, in order to perform this query. Explain the role of each operation in your query. 4...
Use data preview ofr analysing of query result. GPS Visualiser -Visualise points, polygons, and lines on map. Use Open Street Map, Goole Maps, Bing maps and more than 50 other popular map providers....
function getList($table,$pid=0,&$result=array(),$spac=0){ $sql="select * from {$table} where clsPath =$pid and status='1' order by clsLvl asc"; //echo $sql."<hr>"; $res=mysql_query($sql); while...
- opening a missing repository in 2 windows could result in an internal error when confirming the removal - possible internal error related to bare repositories - Index Editor: did not show a ...
In our example, if one transaction (T1) holds an exclusive lock at the table level, and another transaction (T2) holds an exclusive lock at the row level, each of the transactions believe they have ...
$result = $mysqli->query("SELECT * FROM table_name"); while ($row = mysqli_fetch_assoc($result)) { echo $row['field1'] . " " . $row['field2'] . " "; } ``` 知识点 2: 记录集获取 记录集是指 SQL 查询...
$this->result=mysql_query($this->sql,$this->conn); if (!$this->result) $this->show_error('SQL语句有误',true); return $this->result; } /***********************************************************...
Custom View with built-in visual query builder Basic reporting Export to Printer-friendly/HTML/Word/Excel/CSV/XML from List/View page Multi-column sorting User selectable page size Table-specific ...
//对动态表镜像查询,SQL⽅式-未注册表 Table selectResult = tableEnv.sqlQuery("select * from " + table); 1.3 读取⽂本(FileSystem)数据,并使⽤TableAPI进⾏查询 //Flink1.10写法使⽤connect⽅式,读取txt⽂...
$result = mysql_query($query); $num = mysql_num_rows($result); $page_count = ceil($num/$page_size); //$offset = ($page_count-1)*$page_size; if(empty($_GET['page'])) { $page = 1; }else { $page = $_...
query with an updatable result set query with macro support table component thread safe BLOB-fields (including LOB and BFILE for Oracle8) stored procedure support (with mutiple result sets for ...