How to send data from database to textimput

How to do this correct?
[php]
if ($_POST['request'] == "pokazOnas") {
     $sql = mysql_query("SELECT text FROM podstrony WHETE podstrona=Onas");
     $result = "";
     $result .= '<tab>';
     while($row = mysql_fetch_array($sql))
         $result .= "<element text='".$row['text']."' />";
     $result .= '</tab>';
     echo $result;
[/php]
[html]<mx:List width="701" dataProvider="{pokazOnas.lastResult.tab.element}">
                <mx:TextInput id="tekst_Onas" width="700" height="440" text="tab.selectedItem.text"/>
</mx:List>
         <mx:HTTPService id="pokazOnas" url="http://localhost/server-debug/form.php"
                     method="POST">
                         <mx:request>
                             <request>pokazOnas</request>
                         </mx:request>
         </mx:HTTPService>[/html]
Error:
Severity and Description    Path    Resource    Location    Creation Time    Id
Multiple initializers for property 'dataProvider'. (note: 'dataProvider' is the default property of 'mx.controls.List').

Try this:
  <mx:List width="701" dataProvider="{ pokazOnas.lastResult.tab.element }">
    <mx:itemRenderer>
      <mx:Component>
          <mx:TextInput width="700" height="440" text="{data.text}"/>
      </mx:Component>
    </mx:itemRenderer>
  </mx:List>
Or the following may suit your needs:
  <mx:List
      width="701"
      dataProvider="{ pokazOnas.lastResult.tab.element }"
      itemRenderer="mx.controls.TextInput"
      labelField="text"
      rowHeight="440"/>
Take a look at this link for more item renderer options:
http://www.adobe.com/devnet/flex/quickstart/using_item_renderers/

Similar Messages

  • How to send data from internal table to the shared folder in ABAP

    Hi experts,
             My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is  "
    xxx\y\z....".
    I do not have any idea on how to send data from internal table to the shared folder path.
    can anybody please help me out how to do this?
    Thanks & Regards
    Sireesha.

    Where that folder is located, its on presentation server i.e. desktop or application server.
    If its on presentation server, use FM GUI_UPLOAD.
    If its on application server, then use DATASET functions. Have a look at below link.
    [File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
    I hope it helps.
    Thanks,
    Vibha
    Please mark all the useful answers

  • IDOC :: how to send data from Custom Infotype in SAP HR to third party

    Hi,
    I have created one custom Infotype by number 9020. How to send data from this infotype to third party system and also change pointers need to trigger for this infotype.
    Please help me in doing it.
    I am using one Custom Message type ZTALENT and Custom Idoc Type ZTALENT.
                                                                                    ZTALENT                        Talent Management                                                                               
    5  E1PLOGI                        Header for an HR Object (Master Data or Organizational Data)                                                                               
    5  E1PITYP                        HR: Transported Infotypes and Subtypes for an Object                                                                               
    ZPUSER                         User base Data File                                          
                    ZPERSON                        Personal Information File Segment                            
                    ZPOST                          Position File                                                
                    ZOPE                           Overall Performance                                          
                    ZPWORK                         Outside Work Experience                                      
                    ZPEDUC                         Education Details of Employee                                
                    E1P0000                        HR: HR Master Record Infotype 0000 (Actions)                 
                    E1P0001                        HR: HR Master Record Infotype 0001 (Org. Assignment)         
                    E1P0002                        HR: HR Master Record Infotype 0002 (Personal Data)           
                    E1P0016                        HR Master Record: Infotype 0016 (Contract Elements)          
                    E1P0022                        HR Master Record: Infotype 0022 (Education)                  
                    E1P0023                        HR Master Record: Infotype 0023 (Other/Previous Employers)   
                    E1P0041                        HR Master Record: Infotype 0041 (Date Specifications)        
                    E1P0105                        HR: HR Master Record Infotype 0105 (Communications)       
                   ZE1P9020
                    ZPLANG                         Language Details                                             
                    ZACTION                        Actions Changes            
    Regards,
    Krishna

    Hello Shankar,
             Technically TEMSE files are read by calling the following 3 function modules in sequence,
                  1) RSTS_OPEN_RLC or RP_TS_OPEN: open the temse object
                  2) RSTS_READ : read the object
                  3) RSTS_CLOSE: close the object
    Regards,
    Rajesh

  • How to retrive data  from  database views or projection views

    how to retrive data  from  database views or projection views

    Hi chintam,
    1. Very simple
    2. Just like normal select statement.
    3. Select * from VIEWNAME.
    4. (Instead of the tablename, we just have to give the viewname)
    regards,
    amit m.

  • How to display data from Database individually??? Anyone can help ?

    HI,
    i i had select a row of data from database using ,
    /* Query * From Table RESOURCEORDER where po = selected no and project = selected project */
         public ResultSet getAllData() throws SQLException
         getConnection();
         Statement stmt = conn.createStatement();
         ResultSet rs = stmt.executeQuery("SELECT * FROM RESOURCEORDER WHERE PROJECT = '" + getSelProject() + "' and PURCHASEORDERNO = '" + getPo() + "'" );
         return rs;
    After that , how do i display the data individually ?
    Eg select data is ('projectA','7891203-1', '10-4-2005','lcd',2000,'121-45217-8','electrical','pending','donwong')
    i want to display them individually, like this in a page
    Projectname: /* should display the Project A*/
    P.O no:
    Date:
    Order:
    Cost:
    Acc no:
    Type:
    status:
    Orderedby:
    Can anyone help ? cos i'm new to JSP ......Thanks alot!!!!!
    Regards,
    khim

    I assume PO being a unique key, will always return 1 row from db.
    public String[] getAllData() throws Exception
    getConnection();
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM RESOURCEORDER WHERE PROJECT = '" + getSelProject() + "' and PURCHASEORDERNO = '" + getPo() + "'" );
    String [] returnValue = new String[9];
    while(rs.next())
    returnValue[1] = rs.getString("colname");
    returnValue[2] = rs.getString("colname");
    ///and so on
    return returnValue;
    }Once you get that you could individually view it by setting a loop to run through the returned array.
    Hope it helps

  • How to fetch data from database in javafx 2.2 table which is editable.

    Dears!
    I want to fetch data from database in javafx 2.2 tableformat with jdbc , which is also editable and i can add more records in this table also.
    Can anybody help me

    I can vaguely recall some sort of JavaFX database connectivity feature, I'm not sure if it's valid anymore.The link is based on JavaFX Composer which only applied to NetBeans 6.9 and JavaFX 1.x (both of which are now dead techs).
    There is a good chance you will have to write your own. There are several blogs describing other peoples' work. You could probably use them as a reference.Here is Narayan's basic [url http://blog.ngopal.com.np/2011/10/19/dyanmic-tableview-data-from-database/] tutorial for displaying data from a database in a TableView, you'll need to look elsewhere for the editing portion.
    The [url http://docs.oracle.com/javafx/2/ui_controls/table-view.htm]JavaFX TableView tutorial gives info about how to handle edits in a TableView, but you will need to tie the updates back to the database yourself.
    It is possible that [url http://www.javafxdata.org/]DataFX may provide some facilities to help support you.

  • How to extract data from database to XSLT?

    I want to generate a report by XSLT, but the data is extracted from the database. I will use Access/SQL server for my database. Can i write SQL in XSLT to extract data from database? Have any sample code or reference website to show how it work?
    THX

    for example: "SELECT code, name FROM TABLE FOR XML RAW"
    String xml = null;
    if(rs.next()){
      xml = rs.getString(1);
    }You will get xml string something like this:
    <row empID="1234"/><row empID="1235"/>
    You can construct a DOM using this xml data and operate on it.
    However you may explore more on resulting xml format.
    A different SQL Query (rather than using XML RAW) may give output in a more desired format.

  • How to retrieve data from database to the structure(complicated)

    Hello everyone:
           I want to retrieve data from database to the structure. but the structure defined like this below:
    TOLERANZOB LIKE QAMV-TOLERANZOB
    TOLERANZOB1 LIKE QAMV-TOLERANZOB
    so how can I retrieve the data from the database ? make sure that the two fields contain data both.
    Thanks in advance .
    Regards
    Nick

    Hi Nick,
    To retreive data for TOLERANZOB from QAMV,
    If you know the key fields then use
    SELECT SINGLE TOLERANZOB FROM QAMV INTO TOLERANZOB WHERE keyfields.
    else, you can use
    SELECT TOLERANZOB FROM QAMV UPTO ONE ROWS INTO TOLERANZOB WHERE....
    Once you retreive the data using the select query, you can check if it is initial and if not move the data from TOLERANZOB to TOLERANZOB1.
    <b>Reward points for helpful answers.</b>
    Best Regards,
    Ram.

  • EPM add-in for Excel question : How to send data from local member?

    Dear experts,
      for EPM add-in for excel, how do I send data from local member?
    best regards,
    Evans.

    Hello Evans,
    Could you please explain what is your requisite? What is the formula on your local member?
    You can also apply formulas to formatting sheet. This way you can reference the cells in your formatting sheet formulas and save the values in the report area.
    Please check this blog:
    How to use Excel formulas in BPC Input Schedules
    Thank you
    Best regards,
    Raquel Oliveira

  • Help , How to get data from database using recordset with UI API

    I want to get a data from database
    when I want to create recordset i notice that UI API didn't has record set
    so I created recordset using DI API (SAPbobscom.recordset and SAPbobscom.company)
    ======================================================
    Dim oCompanyUI As SAPbouiCOM.Company <<UI API
    Dim oRecSet As New SAPbobsCOM.Recordset << DI API
    Dim oCompanyDI As New SAPbobsCOM.Company << DI API
    '=====================================================
    oCompanyDI.Connect
    Set oRecSet = oCompanyDI.GetBusinessObject(BoRecordset)
    oRecSet.DoQuery ("SELECT T0.CardCode, T0.CardName FROM OCRD T0")
    SBO_Application.MessageBox oRecSet.Fields.Item(1).Value
    ======================================================
    but I got an error it said "you are not connected to company"
    I'm really don't have an idea about how to get a data from using UI API (exp I want to get a date or costumer code)
    can someone help me please, I really need it
    Thanks

    you need a single sign on
            Dim oDICompany As SAPbobsCOM.Company
            Dim sCookie As String
            Dim sConnStr As String
            Dim ret As Integer
            oDICompany = New SAPbobsCOM.Company
            sCookie = oDICompany.GetContextCookie
            sConnStr = SBO_Application.Company.GetConnectionContext(sCookie)
            If oDICompany.Connected Then
                oDICompany.Disconnect()
            End If
            ret = oDICompany.SetSboLoginContext(sConnStr)
            If Not ret = 0 Then
                SBO_Application.MessageBox("set Login Context failed!")
                Exit Sub
            End If
            ret = oDICompany.Connect()
            If Not ret = 0 Then
                SBO_Application.MessageBox("Company Connect failed!")
            End If

  • How to put datas from database in html�s forms?

    Does anyone have any idea how to put datas from the database using JSP???

    One option: put your data into a JavaBean and then put that into the session. You can then access it from your JSP. You can access the properties of the bean using the basic JSP scripting elements, or if you want to get fancy, both JSTL and Struts have a bunch of custom tags for working with JavaBeans.

  • Oracle form: how to retrieve data from database to pop list

    I have problem in retrieving data from database to item list in
    oracle forms.
    Can anyone help me.
    thanks.

    The next is an example but you can find this information in
    Forms Help:
    DECLARE
         G_DESCS RECORDGROUP;
         ERRCODE NUMBER;
         rg_id RECORDGROUP;
         rg_name VARCHAR2(40) := 'Descripciones';
    BEGIN
         rg_id := FIND_GROUP(rg_name);
         IF Id_Null(rg_id) THEN
         G_DESCS := Create_Group_From_Query (rg_name, 'SELECT
    DESCRIPCION DESCRIPCION, DESCRIPCION DESC2 FROM FORMAS_PAGO);
         ERRCODE := POPULATE_GROUP(G_DESCS);
         POPULATE_LIST('FORMAS_PAGO.CMBDESCRIPCION',G_DESCS);
         END IF;
    END;
    Saludos.
    Mauricio.

  • How to download Data from Database directly into excel

    I have a requirement to download very large quantity of data from database into Excel file.
    But condition is excel file should have only 65,536 rows in a single spread sheet(that's the limit i suppose),if i have more data points(rows) than it should be stored into different spreadsheet.......this continues so there can be many spread sheets in a single excel file.
    Data size can be 1 GB or more.
    Also specific naming conventions need to be followed for giving name to excel as well as different spread sheets in it.
    Please see if someone could help me out.

    Thanks for ur reply,
    But my requirement is to call "download to excel" method,in a java program on click by user for downloading an excel sheet on his machine.
    This is be done as part of a web application which is to be made (so can't open the excel first)

  • How to put data from database into array

    I need to answer hot to put data from database directly into array.
    I tried like the code below but the error message said: java.lang.ArrayIndexOutOfBoundsException: 0, and it points to this line: numbers [row][0]= rs.getString("ID");
    Hope you can help.
    ResultSet rs = stmt.executeQuery(query);
         int row=0;
         String [] [] numbers=new String [row][10];
         // output resultset
         while ( rs.next() )
              numbers [row][0]= rs.getString("ID");
              numbers [row][1]= rs.getString("name");
         row++;
         // close resultset
         rs.close();
    thanks,Devi

    The exception is been thrown simply because you assigned '0' to the 'row' variable, indicating a zero length of the array. In fact you should assign the row count to it.
    After all, don't do that. Make use of the Collection framework and map the ResultSet to a Collection of DTO's.
    List<User> users = new ArrayList<User>();
    while (resultSet.next()) {
        User user = new User();
        user.setID(resultSet.getString("ID"));
        user.setName(resultSet.getString("name"));
        users.add(user);
    }

  • Sending data from database to a Text file..??????

    hi guys i am having trouble sending records from a database to a .txt file,
    (the database is on my local machine)
    the code so far is below, when i compile, it compiles with no problems but when i run it it gives me errors....the errors are below....
    any advice or help will be appreaciated ...tc
    =============================================================================================
    code:
    =============================================================================================
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.math.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    public class DataOut extends JFrame {
    public DataOut()
    try
    // Connect to the Database
    //connection object created using DriverManager class
    //carpark is the name of the database
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection connect =DriverManager.getConnection("jdbc:odbc:carpark");
         // Read data from a table
    String sql = "SELECT * FROM member";
    Statement stmt = connect.createStatement();
    ResultSet rset = stmt.executeQuery("SELECT dds, dss, t, s FROM member");
    String str = "";
    while (rset.next()) {
    str += rset.getInt(1)+" "+ rset.getString(2)+" "+ rset.getFloat(3)+" "+rset.getInt(4)+"n";
    byte buf[] = str.getBytes();
    OutputStream fp = new FileOutputStream("file.txt");
    fp.write(buf);
    fp.close();
    rset.close();
    stmt.close();
    connect.close();
    catch(Exception e) {
    e.printStackTrace();
    this.setSize(450,260);
    this.setLocation(500,200);
    public static void main(String[] args)
    DataOut frame = new DataOut();
    ==========================================================================================================
    ===========================================================
    error:
    ===========================================================
    C:\Users\giga\Desktop>javac DataOut.java
    C:\Users\giga\Desktop>java DataOut
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Invalid characte
    r value for cast specification on column number 1 (dds)
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
    at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(JdbcOdbc.java:3811)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(JdbcOdbcResultSet.java
    :5638)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:583)
    at DataOut.<init>(DataOut.java:32)
    at DataOut.main(DataOut.java:54)
    C:\Users\giga\Desktop>java DataOut
    ===============================================================
    all the best..

    thx a lot it works...
    when it outputsto the txt file,, the data is all in one line...how can i seperate the output..sothat after it does one record the next record starts on a new line in the txt file...
    i know i have to edit this bit of the code but i am not sure which part...if that makes sense...
    ResultSet rset = stmt.executeQuery("SELECT dds, dss, t, s FROM member");
    String str = "";
    while (rset.next()) {
    str += "First name: "+ rset.getObject(1)+"\n" + " Second name: "+ rset.getObject(2)+" Third data: "+ rset.getObject(3)+" Fourth data: "+rset.getObject(4);
    i have tried "\n" but it seems not to work..

Maybe you are looking for