Datagrid column name problem
Hi;
I'm new to flash AS.
Datagrid column name codes..
Code:
var dp:DataProvider = new DataProvider();
dp.addItem({column1:"xx", column2:"xx", column3:"xx" });
works fine but if i'm change column name to numeric value (eg:32) gives me error..
Datagrid is not supported numerical value?
Thanks for help..
Worked fine..
Thx for your help!
Similar Messages
-
Hi all.... I have a little strange problem.. I hope you all can help me in solving this.
for brief intro, I have an web application on MySQL written entirely in JAVA. Now we want to migrate from MySQL to Oracle... We have used Oracle Migration Workbench for migrating Schema and data. There is no problem uptill now.
The real problem is with the column names... to clear the problem lets have an example...
In mysql, if you execute[b] 'Select employeeID,empName from employee' you will always get 'employeeID' and 'empName' column names in the resultset meta data... but if you executes the same query on oracle you will get 'EMPLOYEEID' and 'EMPNAME' column names in resultset meta data... then we make some xmls using these column names and then parse them and get values using HashMap... now in hashmap 'a' is different from 'A'... We did not take care of this problem while building this application. Now the application is almost completed and we are just one step away from migrating to Oracle but this problem is hindering us.
just keep in mind there are several jsps,java beans, java services working on DB. So we need such a solution to apply on oracle and get our desired column names back from result set meta data.
I have tried multiple solutions for this.
1. Synonyms.. but you can only create synonyms for table not for column names
2. Create table with double qoutes... but then we have to change all our queries which requires a lot of files to change.
3. Create Views.... but it has same problem as of point 2.
Can you suggest any better way to work around this problem... which require minimum effort and we migrate to oracle with existing code... Otherwise we have to do a lot of donkey work to change the code...
Thanks in advance
Message was edited by:
user587592migrate to oracle with existing code... Otherwise we
have to do a lot of donkey work to change the code...Is that not why SED/AWK/GREP and PERL were invented?
As others have said, the SQL standard as well as several implementations do not support mixed- or camel-case identifiers. IN addition, only 8 character identifers are required, all else is 'above the standard'. You are facing a typical porting issue. -
Case sensitive column name problem
I have a strange problem in my application.
I install the application on several machines with no problem but in one machine I'm getting an exceptions on:
"Column 'SomeColumnName' does not belong to table"
the code look like this:
DataRow newDataRow = myTableFromDatabase.NewRow();
newDataRow["SomeColumnName"] = dr["SomeColumnName"];
when I change the code to upper case:
DataRow newDataRow = myTableFromDatabase.NewRow();
newDataRow["SOMECOLUMNNAME"] = dr["SOMECOLUMNNAME"];
it works on the problematic machine.
- I got the same problem on reading data from OracleDataReader.
- The property DataTable.CaseSensitive was not changed (default = false).
I'm not sure this is ODP problem or .net but I can't find any .net issues on that.Ok ,
This is the most bizar bug that I ever saw:
The problem was that the machine was running in turkey.
In .NET culture settings the function ToUpper is not work on the letter 'i' when the region is turkey.
That means that oracle ODP OracleDataReader is case sensitive on the column name - if the column name have the letter 'i'. -
When trying to load compiled java classes, I always get the following:
Error while retrieving errors for BradTest
ORA-00904: invalid column name
resolver :
Error while resolving class BradTest
ORA-00904: invalid column name
loadjava: 2 errors
I get this error no matter what, even if I have an empty class with no methods or variables. I am using the following syntax for the loadjava:
loadjava -user id/password@host:1521:SID -t -r -v BradTest.class
Any ideas what the problem is?
Thanks,
BradSounds as though the JVM may not be correctly or completely installed. You may need to rerun the INITJVM.SQL script (as sys) and check the alert log for errors.
-
All,
I am a new user of JSC and am hopefully running into a simple issue. I've searched the forums here but so far have not found any postings regarding my problem. Apologies if this has been asked and answered before.
I am building a webapp to display data from a MySQL database. There are several places in the schema where I need to join to the same table multiple times. I have setup the joins in the query builder and also setup a view in the database directly that does the joins. Either way, the query works fine and returns the expected data. The trouble is that the rowset underlying the dataprovider is not returning the metadata using either the table&column aliases from the query builder or the column names from the view, but rather in all cases returning the underlying table and column names. In my table component I am trying to display the data from each table.column alias distinctly but because the metadata visible to the dataprovider is the same (ie table.column), I end up with both table columns showing the same data. I've tried to track down the implementation of the metadata getter method but it is apparently in source that is not provided.
In case it matters, I'm using mysql-connector-java-5.0.3-bin.jar as the driver.
Is there something I'm missing or is there a workaround for this?
Thanks in advance,
ScottThanks,
I should have been more explicit in my description of the problem.
Example of what I have is as follows:
select table1.columnA, table2.columnA as columnX,....
from table_name as table1 join table_name as table2....
where there are other tables and columns in the select clause as well as the join conditions but where the base table and column (in the above table_name.columnA) are used twice with two different aliases. I have done this join directly in the query builder and also created a view, hiding the actual names of the columns. I can execute either query in the query builder and the columns in the result set "spreadsheet" are labeled with the base table column names, not the aliased names or the view's column names. This is causing a problem because the same thing happens when I try to bind the ui:table columns to the dataprovider. It uses the base tables' column names and I have no way to distinguish between the different aliases. If I try to manually change the jsp to refer to the aliased name or the view column name, I get an exception that the aliased tablename and or column is an invalid parameter.
Sorry if that was not clear in my original post. -
Hi..
I have a table component and that is bound to a Database Table.
I have button name "UPDATE" which commits changes to DB.
When I press "UPDATE" button an error occurs...
Number of conflicts while synchronizing: 1 SyncResolver.UPDATE_ROW_CONFLICT row 0 [sunm][SQLServer JDBC Driver][SQLServer]Invalid column name 'date'.I dont have any column name "date".
I tried my best but not yet successful..
Thanks
TariqHi RK,
Here is the SQL Statement
SELECT ALL dbo.DailyFlyingProg.FormationNo,
dbo.DailyFlyingProg.TailNo,
dbo.DailyFlyingProg.Pakno_Front,
dbo.DailyFlyingProg.Pakno_Rear,
dbo.DailyFlyingProg.MissionID,
dbo.DailyFlyingProg.Config,
dbo.DailyFlyingProg.Ready,
dbo.DailyFlyingProg.Take_Off,
dbo.DailyFlyingProg.Ess_Exe,
dbo.DailyFlyingProg.Area,
dbo.DailyFlyingProg.Stack_EAC
FROM dbo.DailyFlyingProg
WHERE dbo.DailyFlyingProg.Date1 = ? Thanks
Tariq -
iam not able to insert data into datagrid corresponding to the column names..as iam inserting both data and column names programatically..ie iam not able to co relate the data with the column names.plzzz help me asap
A DataGrid is row-based rather than cell-based with each row
corresponding to an item in an underlying collection (specified in the
dataProvider property). In order to add data to a DataGrid you
manipulate the underlying collection, rather than the grid directly.
Based on the limited description of your problem I would imagine you
would need to create dynamic objects with property names that correspond
to the dataFields of your dynamically created datagrid columns.
So if you had created columns with dataFields "alpha", "beta" and
"gamma" on your datagrid, you could create an item in your grid by
adding the following object to your dataProvider:
var gridItem : Object = new Object();
gridItem.alpha = "alphaValue";
gridItem.beta = "betaValue";
gridItem.gamma = "gammaValue"; -
Problem in XI - JDBC (oracle) Scenario, case sensitive column name
I had a XI -> JDBC scenario, connecting to a SQL server, where the query was being generated using Message Mapping (XML SQL Format),
now the database has been migrated from SQL server to Oracle, and we are using the same XI scenario, but now the problem is, the query generated using message mapping doesnt work because it seems the query (UPDATE statement) requires the field name as having All capital letters, i mean the Column name in query to Oracle has become case sensitive,
can u help me outHi
Oracle doesnt have restriction that Query has to be in uppercase for any column. But it is good go use Upper case for the Query.
Use oracle editor to do the query if it is working fine and then use XML SQL in XI
Check this thread SAP has given some
http://help.sap.com/saphelp_nw04s/helpdata/en/43/68a541a1166153e10000000a1553f6/frameset.htm
Check FAQ on the JDBC adapter, see SAP Note 831162
always useful Note
Thanks
Gaurav -
Using dynamic column name in datagrid selectedItems
Hi
I have a datagrid loaded with 2 columns. Allowmultiselect is turned on.
Based on the values selected at run time, I get the corresponding selected column name and its values and shown it on HTML screen.
// grp is datagrid
// dgrcl is a data grid column
// selflds is an array which has 0,1,2,3 values
//selflds[0] = name,selflds[1]=age
for (var l:int=0; l<grp.columnCount; l++)
dgrcl =grp.columns[l];
selflds[l] = dgrcl.dataField;
// srhVals will have only one selected value at any point
// getting the corresponding selected column name and its value
var srhVals:String;
srhVals = String(grp.selectedItem[selflds[1]]);
I am trying to achieve the above selection instead by .selectedItems somthing like this below. By doing like this, I will get all the selected items but not only one. If i try below syntax, i get error. Any one has ideas on how to do.
srhVals = String(grp.selectedItems.selflds[1]);Hi
I got my mistake, there should be no dot operator after selectedItems;
I got a solution - it goes like this:
for(var g:int=0;g<grp.selectedItems.length;g++)
srhVals = srhVals + String(grp.selectedItems[g][selflds[1]]);
So the complete scenario is like this:
Datagrid:
Name Age
a 20
b 30
c 40
d 50
I am selecting b,d in UI. At run time, I get programatically the selecteditem column name as "Name", loop through the selecteditems and store the value in srhVals as b,d.
b,d will be finally shown in UI. -
Problem in getting column name by API "SQLColAttribute"
The column name is "~<>#!@" (Japanese SBC case).
Using Oracle ODBC driver, the result turns to be "?<>#!@" , the SBS case ~ (tilde) cannot be obtained correctlly.But there is no problem if the driver change to Microsoft ODBC for Oracle.
Can anyone tell me how to get the correct character using Oracle ODBC dirver?
Bye the way, my environment is "NLS_LANG=JAPANESE_JAPAN.JA16SJIS"Hi Nitin,
Following is the specification for getRemoteHost()
"Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined. For HTTP servlets, same as the value of the CGI variable REMOTE_HOST." I think the same would be true for getHostName().....
So, this can be one possiblity why ur given IP. -
DataGrid with Image column rendering problem
Hi,
I'm having trouble in getting images displayed on a datagrid
column. If I scroll down and then scroll up the scrollbar, the
images are rendering fine. The source of the image is Bitmap which
is generated at run time. Any idea how to solve this problem? Any
help is greatly appreciated.
Thanks,
Jeesmon
My component code is pasted below
"Attach Code"
<?xml version="1.0" encoding="utf-8"?>
<mx:DataGrid xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init()" dataProvider="{cardDataProvider}">
<mx:Script>
<![CDATA[
import mx.core.UIComponent;
import
org.eclipse.higgins.cardselector.filters.CustomDropShadowFilter;
import mx.collections.ArrayCollection;
import mx.controls.Image;
import org.eclipse.higgins.cardselector.icard.Card;
[Bindable]
private var cardDataProvider:ArrayCollection;
private var _cards:Array;
public function get cards():Object {
return this._cards;
public function set cards(value:Object):void {
this._cards = value as Array;
if(this._cards != null && this._cards.length > 0)
buildDataProviderArray();
private function buildDataProviderArray():void {
var dataArray:ArrayCollection = new ArrayCollection();
for(var i:int = 0; i<this._cards.length; i++) {
var card:Card = this._cards
dataArray.addItem(card);
this.cardDataProvider = dataArray;
private function init():void {
this.styleName = "CardsBox";
this.width = 200;
this.rowHeight = 120;
this.headerHeight = 0;
this.liveScrolling = true;
this.filters = [new CustomDropShadowFilter(0x333322, 55,
2).getInstance()];
]]>
</mx:Script>
<mx:columns>
<mx:DataGridColumn sortable="false" editable="false"
resizable="false">
<mx:itemRenderer>
<mx:Component>
<mx:VBox width="100%" height="100%" paddingLeft="5"
paddingRight="5" paddingTop="5" paddingBottom="0"
verticalGap="0">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function getBitmap(value:*) : DisplayObject
var result:DisplayObject;
var loader:Loader = Loader(Image(value).getChildAt(0));
if(loader.contentLoaderInfo.childAllowsParent)
if(loader.content is Bitmap)
var bitmap:Bitmap = Bitmap(loader.content);
result = new
Bitmap(bitmap.bitmapData,bitmap.pixelSnapping,bitmap.smoothing);
return result;
]]>
</mx:Script>
<mx:Image source="{getBitmap(data.getImage())}"
height="80" width="120" styleName="CardsBoxImage" />
<mx:Label text="{data.getName()}"
styleName="CardsBoxLabel" width="100%" />
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>I solved the issue by adding creationComplete event handler
for the image in the datagrid column
<mx:Image source="{data.getImage()}" height="80"
width="120" styleName="CardsBoxImage"
creationComplete="event.target.source =
getBitmap(event.target.source)" /> -
Having a column name as a variable within a query,Problem!!!!
I have a problem with a simple query shown below
SELECT * FROM DisneyWHERE Upper(COLNAME) LIKE UPPER('%' || SEARCHSTRING || '%');SELECT * FROM Disney
WHERE Upper(COLNAME) LIKE UPPER('%' || SEARCHSTRING || '%');
My problem, The colname variable is not being recognised as a column name for example
A user can select to view a set of characters from the DB by username, movies, etc etc (they select this from a combobox) They then enter a search string(textbox)
colname = username
Searchstring = pluto
SELECT * FROM Disney
WHERE Upper(COLNAME) LIKE UPPER('%' || SEARCHSTRING || '%');
The problem is orac;e does not seem to be picking up that colname is a column name and seems to be doing a simple comparison. To make this clearer
it' seems to be trying to match username = pluto
rather than finding pluto in the username column.
Has anyone got any ideas how i can get around this. I have a strange feeling it is something to do with dynamic pl/sql but i am new to oracle so i have no idea how to write dynamic queries. Any help would be muchly appreciated
I am using oracle 11g and visual studio .net 2005user10372910 wrote:
If you can refer me to any material you think i would find helpful to read or experiment with pls let me knowThe online documentation is a good place to look...
http://www.oracle.com/pls/db102/homepage?remark=tahiti
Start with the concepts guide which gives a good background to the Oracle database.
Look up "bind variables", "hard parsing"/"soft parsing" of queries
In light of what boneist highlighted, you may also want to do a search for "function based indexes".
Those topics should give you some insight into the performance issues around queries and why it is better to write SQL that uses bind variables and get's soft parsed (re-usable SQL) rather than writing dynamic queries that become hard parsed (non-reusable SQL). -
Problem with column name width
Hello!
I have a report and the column names are too big. Is there a possible way to make them appear in two lines so the column width would be smaller?
Thanx in advance for any answers...Hello,
I can't reproduce that problem. Probably dependent of the Template you're using. You can try setting the height of the class (I can't tell you which one - unless you set up an example on apex.oracle.com) to a larger value.
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-) -
Problem in displaying row vale as column name
Hello Experts,
Please help me,its very urgent....
i want to dispaly a column value as a column name.
i have two column into selete statement and i want to dispaly one column value as a column name and other column value as a single row.
My query is :
SELECT MAX(DECODE (NAME,'virtualDeviceId',VALUE))vdid ,
MAX(DECODE (NAME,'virtualDeviceType',VALUE)) vdevtype,
MAX(DECODE (NAME,'domainName',VALUE)) vdevtype1,
MAX(DECODE (NAME,'sCTPPortSip',VALUE)) vdevtype2,
MAX(DECODE (NAME,'signallingIpAddress',VALUE)) vdevtype,
MAX(DECODE (NAME,'signallingNetworkMask',VALUE)) vdevtype,
MAX(DECODE (NAME,'uDPPort',VALUE)) vdevtype,
MAX(DECODE (NAME,'uDPPortEnum',VALUE)) vdevtype,
MAX(DECODE (NAME,'sCTPPort',VALUE)) vdevtype,
MAX(DECODE (NAME,'sCTPPortM3UA',VALUE)) vdevtype FROM(
SELECT extractvalue(VALUE(l),'/S109:trafficParameters/S109:name'
, 'xmlns="http://itprogrammes.intra.bt.com/pdb/capabilities/ManageDaaliResource/2005/11/16" xmlns:header="http://wsi.nat.bt.com/2005/06/StandardHeader/" xmlns:S97="http://ccm.intra.bt.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services" xmlns:S109="http://ccm.intra.bt.com/2005/11/16/LIB/Info/MTOSI"') NAME,
extractvalue(VALUE(l),'/S109:trafficParameters/S109:value'
, 'xmlns="http://itprogrammes.intra.bt.com/pdb/capabilities/ManageDaaliResource/2005/11/16" xmlns:header="http://wsi.nat.bt.com/2005/06/StandardHeader/" xmlns:S97="http://ccm.intra.bt.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services" xmlns:S109="http://ccm.intra.bt.com/2005/11/16/LIB/Info/MTOSI"') VALUE
FROM INTERFACE_MESSAGE_DESTINATION imd ,TABLE(xmlsequence(EXTRACT(XMLTYPE(imd.remote_request),'/activateConnection_Payload/jobBody/subnetworkConnection/S109:aEndTerminationPoint/S109:managedElement/S109:physicalTerminationPoint/S109:connectionTerminationPoint/S109:trafficDescriptor/*'
, 'xmlns="http://itprogrammes.intra.bt.com/pdb/capabilities/ManageDaaliResource/2005/11/16" xmlns:header="http://wsi.nat.bt.com/2005/06/StandardHeader/" xmlns:S97="http://ccm.intra.bt.com/2005/11/16/LIB/Info/CCM/AnalysisModel/Services" xmlns:S109="http://ccm.intra.bt.com/2005/11/16/LIB/Info/MTOSI"'))) l
WHERE message_id ='NIAS/0000041608') GROUP BY VALUE ;
output is :
Col1 Col2 col3 col4 col5 col
1.'1001105' '1001105'
2. 'MGC'
3.'value' 'value' 'value'
output display : MGC in Col2 and in row 2, 'values' are in col4 and col5 and in row 3.
I want all values in a single row.
Please help me
Surender RanaIt is ugly to force multiple rows into a single row. But it can be done and can be done dynamically as the following approach shows.
SQL> create or replace type TStrings as table of varchar2(4000);
2 /
Type created.
SQL>
SQL> create or replace function ForceColumns( cur SYS_REFCURSOR ) return TStrings is
2 setCols TStrings;
3 setResults TSTrings;
4 begin
5 setResults := new TStrings();
6 loop
7 fetch cur into setCols;
8 exit when cur%NOTFOUND;
9
10 if setCols.Count > 0 then
11 setResults.Extend( setCols.Count );
12 for i in 1..setCols.Count
13 loop
14 setResults( setResults.Count-i+1 ) := setCols(i);
15 end loop;
16 end if;
17 end loop;
18
19 return(setResults);
20 end;
21 /
Function created.
SQL>
SQL> select
2 ForceColumns(
3 CURSOR(
4 select TStrings(object_id,object_name,object_type) from user_objects where rownum <= 5
5 )
6 ) as RESULT_SET
7 from dual
8 /
RESULT_SET
TSTRINGS('TABLE', 'A', '70998',
'PROCEDURE', 'ABC', '54360',
'TABLE', 'ANIMALS', '84829',
'TABLE', 'B', '69604',
'PROCEDURE', 'BUILDNAMEMAP', '70155')
SQL>Note that as the row can contain any number of columns, it needs to be dynamic. This approach uses a collection type called TStrings to achieve this. -
Problems on selecting views with french characters into column names
Hi All,
I have views with column names such as "Détermination Planimétriq" or "Année de construction:*";
I can get in my c# function this columns names from ALL_VIEWS dictionary table, but if I try to make a selectionby use of an OracleCommand, Oracle returns an "Invalid identifier" error:
SELECT "Détermination Planimétriq" FROM mytable;
System.Data.OracleClient.OracleException (0x80131938): ORA-00904: "Determination Planimetriq": invalid identifier at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at ...
Any suggestion?...Be wary of using character codes outside the Western European "simple" alphanumeric [A-Z0-9] for object names, i.e. columns, table names, function and procedure names, and so on.
First reason, there is a 30 character limit for most object names, and characters that have to be spelled out with unicode characters take more space, i.e.:
select dump( 'Détermination Planimétriq' ) from dual;
DUMP('D?TERMINATIONPLANIM?TRIQ')
Typ=96 Len=29: 68,239,[ ... ]Although the varchar string for that column name looks like 25 characters, it needs room for 29 to store the e<acute> character. And could also depend on the client settings. Using case sensitive names is not a best practice, its better to avoid specifying objects with the double quotes.
http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements008.htm#i27570
Maybe you are looking for
-
I am embedding (Insert/Object/Adobe Acrobat Document) pdf's in an Excel spreadsheet. I'm using the option to show the pdf as an icon. That all works fine. When I double click the icon Acrobat is starting in a maximized Windows window. It is filling u
-
hi i am trying to create new legal entity but ended up with the following error: ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1674 ORA-12535: TNS:operation timed out in Package xle_legal_address_swi Procedure create_legal_address
-
COGS at standard, broken down / cost components
Dear masters I went through numerous post but could not find the answer We here do not have COPA. However I wish to find a report that would break my COGS at standard, into the cost components. (raw material, labor..) Do you know of any such report?
-
Firefox opens an empty window when macbook wakes from sleep.
''duplicate of https://support.mozilla.org/en-US/questions/1013678'' Firefox 31 is active and I close the Lid of my MacBook air. when opening the LID sometime (1 hour?) later an empty windowframe appears. The address-bar is unresponsive. The situatio
-
I have tried in vain to figure out...why it changed at all..used to say Modzilla as my broswer..now the blue line shows file,edit view etc... HELP