Query To Array FLEX-CF
I have a flex site that uses the RemoteObject to connect to a
cfc (coldfusion). The cfc returns a query, now how do I take
information out of the query in flex?
For example if I say dataprovider=evt.result; in a datagrid
everything works fine.
If I try dataprovider=evt.result; in a tilelist I get
nothing. I haev a renderer for my tilelist and I want to only show
the values for image/desciption from the query in the tilelist.
How do I get only the image and description from each row of
the returned query from my cfc?
Please help!
var urlString:String =
http://bang:8500/dcsnew/Export2xls.cfm?myDate="
+ myDataVar;
var url:URLRequest = new URLRequest(urlString);
Similar Messages
-
Pass query string in Flex Builder debug?
Hi,
I'm trying to figure out how to launch a debug session while passing query strings in Flex Builder. If I open up the Debug dialog, and uncheck "Use Defaults" and attempt to add my query string to the Debug Path text field, Flex Builder states that "The file cannot be found to launch". How do I pass a query string to debug in a SWF with Flex Builder?
Thank you.If I understood your question correctly.
go to html-template/index.template.html and add the query string there and everything you run the app the query string should be there.
Hope this helps,
BaBo, -
How to parse BEX Query data to Flex interface via XML
Hi,
How can we pass the Bex Query data in XML tabular format so it can be consumed by a Flex interface?
And communicate back and forth.
Regards
VivekHi,
May be this link is helpful to you,
http://help.sap.com/saphelpnw04/helpdata/en/d9/ed8c3c59021315e10000000a114084/frameset.htm_
All the Best,
Madhu.... -
Hi I am having problems running my sql query.
I have a function that returns an array of type VARRAY(100) OF NUMBER(30). I want to be able to make the following sql call
..... where my_table.columnA IN myFunctions()
I get the following exception
ORA-00932: inconsistent datatypes: expected NUMBER got IDS_ARRAY
Any help is appreciated,
ThanksSQL> create or replace type ids_array is VARRAY(100) OF NUMBER(30);
2 /
 
Type created.
 
SQL> create or replace function my_func
2 return ids_array
3 is
4 ret ids_array := ids_array();
5 begin
6 ret.extend(10);
7 for i in 1..10 loop
8 ret(i) := i;
9 end loop;
10 return ret;
11 end;
12 /
 
Function created.
 
SQL> select rn from
2 (select rownum rn from
3 (select 1 from dual connect by level < 20)) t,
4 table(my_func) b
5 where t.rn = b.column_value
6 /
 
RN
1
2
3
4
5
6
7
8
9
10
 
10 rows selected.
 
SQL> select rn from
2 (select rownum rn from
3 (select 1 from dual connect by level < 20)) t
4 where rn in (select column_value from
5 table(my_func))
6 /
 
RN
1
2
3
4
5
6
7
8
9
10
 
10 rows selected.Rgds. -
Query For Adobe Flex 4 Plug-in for QTP
Hi ,
I have a query regarding Flash plugin for QTP 11.0 . My application is a web application and it is developed using Flash and java. I wanted to use Adobe Flex 4 plug in but was not able to find it. It is still available for download and will it support QTP 11.0
Thanks ,
ShwetaThe Canon EOS 350 (DIgital Rebel XT) was not added to Camera Raw until version 3.1. Photoshop CS only supports Camera Raw 2.x.
You will need to upgrade to CS2 or use the DNG Converter utility to convert the raw files from the 350 to a DNG file that Photoshop CS can work with. -
Get current page address and query string into Flex
Hello!
How can I get the current address in the address bar into
Flex please? (As $_SERVER would in PHP for example)
Thank you!"M*A*S*H 4077" <[email protected]> wrote in
message
news:gob8lp$ke1$[email protected]..
> Aha, so there is no predefined Class in Flex for this?
>
> Thank you, Amy!
That is the class. You might want to look at FABridge,
though, because I
think it is designed to help ease these things. -
Newbie query : sorting arrays
I have an array defined as
textBook [ ] tbk = {"book23","book14","book6","book40","book36"}which is storing values of textBook type.
I have to sort this array into an ascending order as
tbk = {"book6","book14","book23","book36","book40"}I tried using the Arrays.sort(Object [ ]) method .. but it does not work on user defined objects ... can anyone please give me a hint or two on doing it ... thanks in advanceI have an array defined as
textBook [ ] tbk =
{"book23","book14","book6","book40","book36"}
No, that won't work. That's an array of String.
I tried using the Arrays.sort(Object [ ]) method ..
but it does not work on user defined objectsYes it does. But that class has to implement Comparable. (Or you may be able to supply a Comparator.)
http://java.sun.com/docs/books/tutorial/collections/interfaces/order.html
http://www.javaworld.com/javaworld/jw-12-2002/jw-1227-sort.html -
Hi,
I have an array like this :
DATA | YEAR | SCENARIO | JAN | FEB | MAR | ....
data1 2008 1 120 101 109
data2 2008 2 120 105 104
data3 2007 1 100 108 111
data4 2008 1 124 101 116
and I want to search something like we do with a query but on
an array
SELECT JAN
FROM myArray
WHERE
YEAR = 2008
AND SCENARIO = 1
AND DATA= data3
is it possible ? and how to do it ?
Thanks !Here's a simple schema :
1. query from flex to coldfusion
2. cf return array to flex
3. from flex I send the array to cf in order to make some
calcuations (that's where I need to "query" the array)
4. new array returned by cf to flex
the idea is that I make a query on the server A (sql server)
that returns all the infos I need
then I send those infos to the server B (coldfusion) to avoid
using server A ...
do you know what I mean ? -
Query with parameter as Array (UDT) very slow
Hi.
I have following Problem. I try to use Oracle Instant Client 11 and ODP.NET to pass Arrays in SELECT statements as Bind Parameters. I did it, but it runs very-very slow. Example:
- Inittial Query:
SELECT tbl1.field1, tbl1.field2, tbl2.field1, tbl2.field2 ... FROM tbl1
LEFT JOIN tbl2 ON tbl1.field11=tbl2.field0
LEFT JOIN tbl3 ON tbl2.field11=tbl3.field0 AND tbll1.field5=tbl3.field1
...and another LEFT JOINS
WHERE
tbl1.field0 IN ('id01', 'id02', 'id03'...)
this query with 100 elements in "IN" on my database takes 3 seconds.
- Query with Array bind:
in Oracle I did UDT: create or replace type myschema.mytype as table of varchar2(1000)
than, as described in Oracle Example I did few classes (Factory and implementing IOracleCustomType) and use it in Query,
instead of IN ('id01', 'id02', 'id03'...) I have tbl1.field0 IN (select column_value from table(:prmTable)), and :prmTable is bound array.
this query takes 190 seconds!!! Why? I works, but the HDD of Oracle server works very hard, and it takes too long.
Oracle server we habe 10g.
PS: I tried to use only 5 elements in array - the same result, it takes also 190 seconds...
Please help!I did (some time ago and it was a packaged procedure) something like
Procedure p(p_one in datatype,p_two in datatype,p_dataset out sys_refcursor) is
the_sql varchar2(32000);
the_cursor sys_refcursor;
begin
the_sql = 'WITH NOTIFICACAO AS( ' ||
' SELECT ' ||
' t1.cd_consultora, ' ||
' where t1.dt_notificacao_cn >= to_date(''01/09/2006'',''dd/mm/yyyy'') ' || -- note the ''
' where rownum <= :W_TO_REC) ' || -- parameter 1
' where r_linha >= :W_FROM_REC '; -- parameter 2
open the_cursor for the_sql using p_one,p_two; -- just by the book
end p;if I remember correctly
Regards
Etbin -
User Defined Type - Array bind Query very slow
Hi.
I have following Problem. I try to use Oracle Instant Client 11 and ODP.NET to pass Arrays in SELECT statements as Bind Parameters. I did it, but it runs very-very slow. Example:
- Inittial Query:
SELECT tbl1.field1, tbl1.field2, tbl2.field1, tbl2.field2 ... FROM tbl1
LEFT JOIN tbl2 ON tbl1.field11=tbl2.field0
LEFT JOIN tbl3 ON tbl2.field11=tbl3.field0 AND tbll1.field5=tbl3.field1
...and another LEFT JOINS
WHERE
tbl1.field0 IN ('id01', 'id02', 'id03'...)
this query with 100 elements in "IN" on my database takes 3 seconds.
- Query with Array bind:
in Oracle I did UDT: create or replace type myschema.mytype as table of varchar2(1000)
than, as described in Oracle Example I did few classes (Factory and implementing IOracleCustomType) and use it in Query,
instead of IN ('id01', 'id02', 'id03'...) I have tbl1.field0 IN (select column_value from table(:prmTable)), and :prmTable is bound array.
this query takes 190 seconds!!! Why? I works, but the HDD of Oracle server works very hard, and it takes too long.
Oracle server we habe 10g.
PS: I tried to use only 5 elements in array - the same result, it takes also 190 seconds...
Please help!I recommend you generate an explain plan for each query and post them here. Based on what you have given the following MAY be happening:
Your first query has as static IN list when it is submitted to the server. Therefore when Oracle generates the execution plan the CBO can accurately determine it based on a KNOWN set of input parameters. However the second query has a bind variable for this list of parameters and Oracle has no way of knowing at the time the execution plan is generated what that list contains. If it does not know what the list contains it cannot generate the most optimal execution plan. Therefore I would guess that it is probably doing some sort of full table scan (although these aren't always bad, remember that!).
Again please post the execution plans for each.
HTH! -
Accessing Array of Structures from Coldfusion
I am having a problem accessing an array of structures from
Coldfusion within my flex application. Here is how I make my Array:
(GetRegions is a type Query and Type is a string variable)
<cfset ReturnArray = ArrayNew(1)>
<cfset ReturnArray[1] = StructNew()>
<cfset ReturnArray[1].Query = GetRegions>
<cfset ReturnArray[2] = Type>
Within flex I am trying to access the results in the
following way:
private function dataHandler(event:ResultEvent):void{
Query_Filter = new ArrayCollection(event.result[0].QUERY as
Array);
myString = event.result[1] as String;
Can anybody help me with this. I want a way to return a query
and a string back from coldfusion.
Thanks for the help,
JeffSo now I changed my code to the following in CF:
<cfset Type = "MyString">
<cfset ReturnArray = ArrayNew(1)>
<cfset ReturnArray[1] = StructNew()>
<!--- set up query GetRegions --->
<cfset ReturnArray[1] = GetRegions>
<cfset ReturnArray[2] = Type>
<!--- Return Array --->
<cfreturn ReturnArray>
Now in flex I have the following dataHandler Function:
Alert.show("hello: "+ObjectUtil.toString(event.result[0]));
Query_Filter = new ArrayCollection(event.result as Array);
Now I set up a List box with Query_Filter as the dataprovider
but the results aren't showing correctly. The first item in the
list box is displayed as [object, Object], [object, Object] and the
second item is my String.
Does anybody know how to break up the query to a variable and
the string to its own variable in the dataHandler function.
Thanks for any and all help -
How to compare result from sql query with data writen in html input tag?
how to compare result
from sql query with data
writen in html input tag?
I need to compare
user and password in html form
with all user and password in database
how to do this?
or put the resulr from sql query
in array
please help me?Hi dejani
first get the user name and password enter by the user
using
String sUsername=request.getParameter("name of the textfield");
String sPassword=request.getParameter("name of the textfield");
after executeQuery() statement
int exist=0;
while(rs.next())
String sUserId= rs.getString("username");
String sPass_wd= rs.getString("password");
if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
exist=1;
if(exist==1)
out.println("user exist");
else
out.println("not exist"); -
How to convert an array collection instance to a complex object for interaction with webservice
Hi there,
I have a stubborn problem that I am trying to work out the best way to solve the problem. I am interacting with a WebService via HTTPService calling a method called find(String name) and this returns me a List of ComplexObjects that contain general string and int params and also lists of other Complex Objects. Now using the code:
ArrayCollection newOriginalResultsArray = new ArrayCollection(event.result as Array)
flex converts my complex objects results to an arraycollection so that I can use it in datagrids etc. Now up until this part is all good. My problem is when getting a single instance from the results list, updating it by moving data around in a new datagrid for example - I want to interact with the webservice again to do an create/update. This is where I am having problems - because these webservice methods require the complex object as a parameter - I am struggling to understand how I can convert the array collection instance back to my complex object without iterating over it and casting it back (maybe this is the only way - but I am hoping not).
I am hoping that there is a simple solution that I am missing and that there is some smart cookie out there that could provide me with an answer - or at least somewhere to start looking. I guess if I have no other alternative - maybe I need to get the people who built the service to change it to accept an array - and let them do the conversion.
Any help would be greatly appreciated.
BertHi Bert,
According to my knowledge you can use describeType(Object) method which will return an XML... That XML will contain Properties and values just iterate through the XML and create a new Object.. Probably u can use this method...
public function getObject(reqObj:Object,obj:Object,instanceName:String,name:String=null,index:int=-1):Obj ect
if(!reqObj)
reqObj = new Object();
var classInfo:XML = describeType(obj);
var className:String = instanceName;
if(name!=null)
className=name+"."+className;
if(index!=-1)
className=className+"["+index+"]";
for each (var v:XML in classInfo..accessor)
var attributeName:String=v.@name;
var value:* = obj[attributeName]
var type:String = v.@type;
if(!value)
reqObj[className+"."+attributeName] = value;
else if(type == "mx.collections::ArrayCollection")
for(var i:int=0;i<value.length;i++)
var temp:Object=value.getItemAt(i);
getReqObject(reqObj,temp,attributeName,className,i);
else if(type == "String" || type == "Number" || type == "int" || type == "Boolean")
reqObj[ className+"."+attributeName] = value;
else if (type == "Object")
for (var p:String in value)
reqObj[ className+"."+attributeName+"."+p] = value[p];
else
getReqObject(reqObj,value,attributeName,className);
return reqObj;
Thanks,
Pradeep -
My situation is that I have an array of clusters on the front panel. Each element is used for a particular test setup, so if the array size is three, it means we have three identical test setups that can be used. The cluster contains two string controls and a button: 'device ID' string, 'start' button and 'status' string.
In order to keep the diagrams simple, I would like to use a reference to the array as input into a subvi. This subvi will then modify a particular element in the array (i.e. set the 'status' string).
The first problem I encounter is that I can not select an array element to write to by using the reference. I have tried setting the 'Selection s
tart[]' and 'Selection size[]' properties and then querying the 'Array element' to get the proper element.
If I do this, the VI always seems to write to the element which the user has selected (i.e. the element that contains the cursor) instead of the one I am trying to select. I also have not found any other possible use for the 'Selection' properties, so I wonder if I am doing something wrong.
Of course I can use the 'value' property to get all elements, and then use the replace array element with an index value, but this defeats the purpose of leaving all other elements untouched.
I had hoped to use this method specifically to avoid overwriting other array elements (such as happens with the replace array element) because the user might be modifying the second array element while I want to modify the first.
My current solution is to split the array into two arrays: one control and one indicator (I guess that's really how it should be done ;-) but I'd still like to know ho
w to change a single element in an array without affecting the others by using a reference in case I can use it elsewhere.> My situation is that I have an array of clusters on the front panel.
> Each element is used for a particular test setup, so if the array size
> is three, it means we have three identical test setups that can be
> used. The cluster contains two string controls and a button: 'device
> ID' string, 'start' button and 'status' string.
>
> In order to keep the diagrams simple, I would like to use a reference
> to the array as input into a subvi. This subvi will then modify a
> particular element in the array (i.e. set the 'status' string).
>
It isn't possible to get a reference to a particular element within an
array. There is only one reference to the one control that represents
all elements in the array.
While it may seem better to use references to update
an element within
an array, it shouldn't really be necessary, and it can also lead to
race conditions. If you write to an element that has the
possibility of the user changing, whether you write with a local, a
reference, or any other means, there is a race condition between the
diagram and the user. LV will help with this to a certain extent,
especially for controls that take awhile to edit like ones that use
the keyboard. In these cases, if the user has already started entering
text, it will not be overwritten by the new value unless the key focus
is taken away from the control first. It is similar when moving a slider
or other value changes using the mouse. LV will write to the other values,
but will not rip the slider out of the user's hand.
To completely avoid race conditions, you can split the array into user
fields and indicators that are located underneath them. Or, if some
controls act as both, you can do like Excel. You don't directly type
into the cell. You choose w
hich cell to edit, but you modify another
location. When the edit is completed, it is incorporated into the
display so that it is never lost.
Greg McKaskle -
Associative Arrays, Indexes vs. Full Table Scans
Hello,
I just started using ODP.Net to connect my .Net Web Service to our Oracle Database. The reason why I switched to ODP.Net is support for arrays. If I wanted to pass in arrays to the procedure I had to pass it in through a varchar2 in a CSV formatted string.
ex. "123,456,789"
So now I'm using ODP.net, passing in PL/SQL Associative Arrays then converting those arrays to nested tables to use within queries.
ex.
OPEN OUT_CURSOR FOR
SELECT COLUMN1, COLUMN2
WHERE COLUMN_ID IN (SELECT ID FROM TABLE(CAST(ASSOC_ARR_TO_NESTED(IN_ASSOC_ARR) AS NESTED_TBL_TYPE)))
It uses the array successfully however what it doesn't do is use the index on the table. Running the same query without arrays uses the index.
My colleague who works more on the Oracle side has posted this issue in the database general section (link below). I'm posting here because it does seem that it is tied to ODP.Net.
performance - index not used when call from service
Has anyone ever experienced this before?You have to use a cardinality hint to force Oracle to use the index:
/*+ cardinality(tab 10) */See How to use OracleParameter whith the IN Operator of select statement
Maybe you are looking for
-
Apple Remote for iPad: Shuffle?
I use the remote app for controlling AirTunes in my home. The Remote app for the iPhone is designed very well, IMHO, as I can easily find my way around to all of the features I want. The iPad version? Not so much. I'm completely stuck trying to find
-
I changed my Apple ID (other email address and password) and now I can not login to my account in the iPhone iCloud. When I open the tab iCloud displayed my old Apple ID (it was in the iCloud) and asks for a password, but neither the old nor the new
-
ITunes 9.0 toolbar in the Windows Taskbar doesn't work anymore
Anyone else having this problem? The iTunes window disappears and the usual toolbar interface shows on the taskbar but the controls have no functionality. You click them and nothing happens - you can't even get the normal iTunes window back unless yo
-
Lightroom can't display HDR photos
I have five photos in light room, I want to make it a HDR photo. When I highlight all five photo, right click merge to HDR in Photoshop. When photoshop is done and I save it. Everything is fine till I try to open the photo. Lightroom and windows gall
-
Googled this and found a program that would do it, but I want MY program to do it (and/or Undo it) Robert Homes