Help with ComboBox, datasource from database

Hi there,
i am new to Flex technology and desperately need help with
combobox.
I have a combobox in my app and the datasource comes from
MySQL database. I use a PHP script to populate the combobox. Say in
the datatabse table, I have the following result:
id name
1 dog
2 cat
3 horse
In the app, the combobox will have the list as the name of
the animals: dog, cat, horse. But when the user selects dog, how do
I get the selected id 1 instead of the label "dog".
Any help/suggestion will be appreciated.

Hi again,
the xml for the combobox datasource is as follows
<animals>
<animal>
<id>1</id>
<name>dog</name>
</animal>
<animal>
<id>2</id>
<name>cat</name>
</animal>
<animal>
<id>3</id>
<name>horse</name>
</animal>
</animals>
and my <mx:HTTPService> is:
<mx:HTTPService id="dropDown" useProxy="false" url="
http://localhost/~ronnyk/combobox.php"
resultFormat="e4x" result="get_drop_down(event)" />
public function get_drop_down(e:ResultEvent):void{
var dropArr:XML = e.result as XML;
cb.dataProvider = dropArr.animal;
cb.labelField = "name";
cb.data = "id";
public function clickme():void{
txtinput.text = cb.selectedItem as String;
I can't figure out which part I did wrong, in order to get
the id instead of the name when the user clicks the button

Similar Messages

  • Help with Retrieve attributes from database

    Hi,
    I'm using filter "Retrieve from or write to database" with select query from database by selecting attributes as column names radio button.
    I'm unable to get these user attributes with column names.
    For eg : select tag from test_tag where rownum=1;
    I was trying so that result can be used using tag attribute (${tag}).
    Please help in this regard.
    Thanks,
    Vani

    Hi Vani,
    After the retrieve filter, add a Trace Filter and leave it as it is. Execute the policy once and in the trace data that now will be displayed there you should be able to read out the exact name and type of the parameter. This way of identifying data/parameters etc is a recommended way of working while developing! Copy paste the Trace Data from the Trace filter here if you need help!
    Cheers,
    Stefan

  • Help with displaying info from database+asp

    How can I display info from a database so that it is
    formatted into rows in a table
    here is an example of what I would like
    http://www.westerveltcollege.com/new/programs/bus_admin_computers.html
    (it is the section that show the course content)
    I know it has been code into the table but how to do this
    dymanically
    hope that makes sense to someone ;)

    To do it properly you would set up two tables. The first
    would contain the
    topics and be something like this
    topicID
    topicName
    Then you would have a second table that would hold the
    content like this
    contentID
    contentName
    topicID
    The last field links this table to the topic.
    To display them you would link the topics into a master list,
    and then pass
    the topicID to the page displaying the content and use the
    topicID as a
    filter on the content table.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "jnc1965" <[email protected]> wrote in
    message
    news:eeot1q$db0$[email protected]..
    > nice one thanks
    >
    > now one more quetion
    > how do I set up the info in the database
    > I have serveral page for different topics and each page
    has a table like
    > mentioned above
    > I dont want to make a different colunm for each for the
    course contents
    > I would like to build one table and have each subject's
    course content in
    > a
    > column but how would I do this?
    > and still have appear like the example
    >

  • Help with dynamic checkbox from database results

    Hi,
    I am creating some dynamic checkboxes from the results of a database read to sqlite.  I am able to get the data and the correct number of checkboxes is being created but I'm having a problem populating the labels for the checkboxes.  Here is the section of code that gets the results from the database and creates the checkboxes.
                    var result:Array = stmt.getResult().data;
                    for each( var obj:Object in result )
                        var cb:CheckBox = new CheckBox();
                        cb.label = obj.toString();
                        cb.setStyle("color", 0x00593B);
                        cb.setStyle("symbolColor", 0x000000);
                        container.contentGroup.addElement(cb);                   
    Neil

    This was answered on another forum for me.
    The line cb.label = obj.toString();
    needed to be changed to the data.
    cb.label=obj.myDatabaseFieldName;
    myDatabaseFieldName would be whatever column you are pulling the data in from and should be the actual name in the table.
    Neil

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • Help with dynamic datasource and record selection

                                                                                                                                                                                                                                                                                     <span>Hi, I&#39;m having some difficulty with part of an application I&#39;m trying to build, but here&#39;s some background first.<br /> <br /> I am a student at the University of Maryland, and I&#39;m writing an application for one of the departments here at the university.  It is sort of a front-end for an access database with a lot of extra functionality.  This includes reports.  First of all, the user can change the databse that the application uses, so I store that in an appsetting.  For this reason, I have to tell the report what database to use at runtime rather than using the database expert.  I am building a sort of report wizard in which the user selects certain values, and based upon those values, the SQL statement that the report gets data from changes.  So almost everything about the report&#39;s data is dynamic and will be determined at runtime.  <br /> <br /> So for example if the user chooses an officer report by chapter names, I do this (chapters is a comma delimited string):<br /> <br /><span style="font-weight: bold"> string sel = "SELECT * FROM [Undergrad Leadership] WHERE [Leadership Position] = &#39;" + txtPosition.Text + "&#39; AND [Chapter Name] IN (" + chapters + ");";</span><br /> <br /> The part I am lost on, is how to actually interface with crystal reports.  In the following code, conn is an OleDbConnection to the correct database, rep is the ReportDocument, and view is a CrystalReportsViewer.<br /> <br /><span style="font-weight: bold"> rep.DataSourceConnections[0].SetConnection(conn.DataSource, conn.Database, false); <br /> rep.RecordSelectionFormula = sel;</span><br /><span style="font-weight: bold"> view.ReportSource = rep;</span><br /> <br /> When I try to load the report, I get the following error message:<br /> Error in formula <Record Selection>:  a number, currency amount, boolean, date, time, date-time, or string is expected here.<br /> <br /> Also, assuming this formula gets fixed, how do I actually get fields from this formula and datasource onto my report, since I can&#39;t do it at design time?  Thanks in advance for the help.<br /> <br /> -Jared<br />    </span>

    <p>RCAPI (Report Creation and Modification) calls are only available with Crystal Reports Server RAS SDKs.  This means that using the bundled version of Crystal Reports for Visual Studio will not allow you to place fields onto the report.  A free copy of Crystal Reports Server comes with a registered copy of Crystal Reports Developer.  My guess is that you don&#39;t have either of these products and that you are just using the product that came with Visual Studio.</p><p>All is not lost.  The first question is, do you really need to add the fields at runtime?  In many cases developers just want to have control of the data that gets sent to the report and they are ok with having the same fields display.</p><p>In your code you are changing the datasource which is fine, and you are assigning a Record selection formula which is also fine.  </p><p>The problem with the record selection is that it doesn&#39;t fit the syntax of the Report.  I would suggest printing out the value that you programatically get for the formula and insert it into the Crystal Report Designer.  You will probably get the same error there and gets some  hints as to why it doesn&#39;t work.</p><p>What I would suggest is creating a template report that already has the fields on the report and then change its datasource at runtime and add a RecordSelectionFormula.</p><p>Otherwise you will have to use RAS to be able to add fields at runtime. </p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

  • How to log in with user credentials from database table

    Hello all.
    I have a table named users_1 in my database. This table has columns named username, password, email and userid. On userid, I have put a sequence.
    Now, I have manually made 1 row in this table, with in it the user credentials.
    How can I edit my application so that I can use these credentials to log onto the application?
    Please, a step-by-step text would make me rather happy, instead of getting a link with information that I should read. I've read most of it, and it just doesn't make any sense to me, so I prefer a guide-trough.
    Thanks..

    Hi Magali,
    You want only user from database can access your application.
    follow the steps given below.
    Step1  :  create function to authenticate users
    create or replace FUNCTION  "CUSTOM_AUTHENTICATE" (p_username in VARCHAR2, p_password in VARCHAR2)
    return BOOLEAN
    is
      l_password varchar2(4000);
      l_stored_password varchar2(4000);
      l_count number;
    begin
    select count(*) into l_count from users_1 where upper(username) = upper(p_username);
    if l_count > 0 then
       select upper(password) into l_stored_password from users_1 where upper(username) = upper(p_username);
       l_password :=  upper(p_password);
        if l_password = l_stored_password then
          return true;
        else
          return false;
        end if;
    else
      return false;
    end if;
    end;
    Step2  : create authentication scheme for your application
    Go to Application Builder->select your application->shared component->security->authentication scheme->create
    a) custom scheme : Based on a pre-configured scheme from the gallery
    b) give some name to your scheme like custom_scheme or something
    c)scheme type : database account
    d) verify function name = return CUSTOM_AUTHENTICATE
    e) go to = Login Page
    f) Logout url = f?p=&APP_ID.:101 // here 101 is login page no..so you can set your login page no.
    step3  : make this scheme as current scheme
    select your scheme and click make current
    now try to login into your application from your database users..
    Hope this will helps you,
    Thanks,
    Jitendra

  • Help with Moving Emails from Exchange Server 2013

    Hi Team,
    Help, I need a solution on how to copy incoming and outgoing emails together with their attachments and was hoping someone could help with a solution I need to find for this problem.
    1) I have a need to copy all incoming and outgoing emails & attachments from Exchange Server 2013 mailboxes on a daily basis, so they can be archived into an external 3rd party database overnight.
    I believe that the first step is that I can set up another Exchange mailbox, through Journaling to receive these emails. 
    Is there any way that these emails can then be moved direct from the Journaling mailbox that I have created, to a shared folder on the network? If so what format would they be sent out as e.g. .msg, .ems and what is the process?
    Failing that, could they be sent to an Outlook client (not another Exchange mailbox) on the network and stored in a .pst file? (I have a program that will export them from .pst)
    I would really appreciate any assistance that you can provide in this matter.
    Regards, Greg.

    Hi,
    You can set auto-forward on journaling mailbox and auto-forward emails to another mailbox. Why don’t directly archive the emails from the journaling mailbox “an external
    3rd party database”.
    Thanks,
    Simon Wu
    TechNet Community Support

  • Problem with Generic datasource from function

    I developed generic datasource from function module.
    But I have problem with the select options.
    First one is order number  OBJECT_ID type char 10. When I input Object_ID = 45755 , no data selected.
    When input 0000045755, one data record selected.
    But I called functiion CONVERSION_EXIT_ALPHA_INPUT to conevet the input data. And I found  45755 was converted to 0000045755, but no record selected.
         LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'OBJECT_ID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_OBJECT_ID.
            APPEND L_R_OBJECT_ID.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = L_R_OBJECT_ID-high
      IMPORTING
       OUTPUT        = L_R_OBJECT_ID-high
             CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = L_R_OBJECT_ID-low
      IMPORTING
       OUTPUT        = L_R_OBJECT_ID-low
          ENDLOOP.
    Another problem is CREATED_AT, which type is DEC 15,  how could I handle it ?  input is yyyymmdd, I tried to add '000000', but can't select any data.
    Thanks for any help.

    code is :
    FUNCTION ZACTIVITY_PLAN_PARTNER.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZACTIVITY_PLAN_PARTNER OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
      TABLES: CRMD_ORDERADM_H.
    Auxiliary Selection criteria structure
      DATA: L_S_SELECT TYPE SRSC_S_SELECT.
      DATA:   BEGIN OF ACTIVITY,
                       OBJECT_ID       type CRMT_OBJECT_ID_DB,
                       PROCESS_TYPE    type CRMT_PROCESS_TYPE_DB,
                       OBJECT_TYPE     type CRMT_SUBOBJECT_CATEGORY_DB,
                       CREATED_BY      type CRMT_CREATED_BY,
                       CREATED_AT      type CRMT_CREATED_AT,
               END OF ACTIVITY.
      DATA: ZACTIVITY   LIKE TABLE OF ACTIVITY WITH HEADER LINE,
            Zorder   LIKE TABLE OF ZORDER_S WITH HEADER LINE,
            d_start type c length 15,
            d_end type c length 15
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    cursor
              S_CURSOR TYPE CURSOR.
    Select ranges
      RANGES: L_R_OBJECT_ID FOR CRMD_ORDERADM_H-OBJECT_ID,
              L_R_CREATED_AT FOR CRMD_ORDERADM_H-CREATED_AT,
              L_R_date for ZACTIVITY_PLAN_PARTNER-ZPLAN_DAT.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Check DataSource validity
        CASE I_DSOURCE.
          WHEN 'ZACTIVITY_PLAN_PARTNER'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E009(R3). ENDIF.
    this is a typical log call. Please write every error message like this
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDCASE.
        APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
    Fill parameter buffer for data extraction calls
        S_S_IF-REQUNR    = I_REQUNR.
        S_S_IF-DSOURCE = I_DSOURCE.
        S_S_IF-MAXSIZE   = I_MAXSIZE.
        APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
      ELSE.                 "Initialization mode or data extraction ?
    First data package -> OPEN CURSOR
        IF S_COUNTER_DATAPAKID = 0.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'OBJECT_ID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_OBJECT_ID.
            APPEND L_R_OBJECT_ID.
         ENDLOOP.
    if  L_R_OBJECT_ID-option is initial.
      L_R_OBJECT_ID-option = 'EQ'.
      L_R_OBJECT_ID-sign ='I'.
      endif.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = L_R_OBJECT_ID-high
      IMPORTING
       OUTPUT        = L_R_OBJECT_ID-high
             CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = L_R_OBJECT_ID-low
      IMPORTING
       OUTPUT        = L_R_OBJECT_ID-low
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CREATED_AT'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_CREATED_AT.
            APPEND L_R_CREATED_AT.
          ENDLOOP.
          OPEN CURSOR WITH HOLD S_CURSOR FOR
          SELECT OBJECT_ID FROM CRMD_ORDERADM_H
                                  WHERE OBJECT_ID  IN  L_R_OBJECT_ID
                                  AND          CREATED_AT IN L_R_CREATED_AT    and
                                        PROCESS_TYPE EQ 'Z220'.
        ENDIF.                             "First data package ?
    Fetch records into interface table.
      named E_T_'Name of extract structure'.
        FETCH NEXT CURSOR S_CURSOR
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.

  • I need help with paginating my Oracle database records in JSP

    Please can someone help with a script that allows me to split my resultsets from an Oracle database in JSP...really urgent..any help would be really appreciated. I'm using the Oracle Apache http server and JSP environment that comes with the database...thanks

    First thing you have to do is decide on a platform and
    database. Check to see what your server supports. Whether it is ASP
    and MSSQL, PHP and MySQL or less likely Cold Fusion.

  • Help with TaskManagerService.processSearch from Flex

    I am trying to use TaskManagerService.processSearch from Flex (and from C#) but I am having trouble populating the conditions array.All the documentation and examples I could find were in java, and thus use addContidion()... which I do not have access to. 
    What I'm after is an Object (or XML) representation of a processSearchFilter.
    I am trying with something like:
    {conditions:[{property:"provCar.RequestID", operator:"=",value:"53"}],
    serviceName:"SBDBWorkflow/RequestWorkflow"
    and I am getting an error saying my condition cannot be cast to com.adobe.dsc.filter.Condition!
    If I use:
    conditions:[{name:"provCar.RequestID", operator:"=",value:"53"}],
    serviceName:"SBDBWorkflow/RequestWorkflow"
    the condition is ignored and I get back all my process instances.
    Any idea what I am getting wrong on the Condition object?
    TIA
    julio

    Hi again,
    the xml for the combobox datasource is as follows
    <animals>
    <animal>
    <id>1</id>
    <name>dog</name>
    </animal>
    <animal>
    <id>2</id>
    <name>cat</name>
    </animal>
    <animal>
    <id>3</id>
    <name>horse</name>
    </animal>
    </animals>
    and my <mx:HTTPService> is:
    <mx:HTTPService id="dropDown" useProxy="false" url="
    http://localhost/~ronnyk/combobox.php"
    resultFormat="e4x" result="get_drop_down(event)" />
    public function get_drop_down(e:ResultEvent):void{
    var dropArr:XML = e.result as XML;
    cb.dataProvider = dropArr.animal;
    cb.labelField = "name";
    cb.data = "id";
    public function clickme():void{
    txtinput.text = cb.selectedItem as String;
    I can't figure out which part I did wrong, in order to get
    the id instead of the name when the user clicks the button

  • Swing Applet in JSP: problem with fetching data from database

    i am facing a problem while fetching data from database using Swing Applet plugged in a JSP page.
    // necessary import statements
    public class NewJApplet extends javax.swing.JApplet {
    private JLabel jlblNewTitle;
    private Vector vec;
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    NewJApplet inst = new NewJApplet();
    frame.getContentPane().add(inst);
    ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
    frame.pack();
    frame.setVisible(true);
    public NewJApplet() {
    super();
    initGUI();
    private void initGUI() {
    try {
    this.setSize(542, 701);
    this.getContentPane().setLayout(null);
    jlblTitle = new JLabel();
    this.getContentPane().add(jlblTitle);
    jlblTitle.setText("TITLE");
    jlblTitle.setBounds(197, 16, 117, 30);
    jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
    jlblNewTitle = new JLabel();
    this.getContentPane().add(jlblNewTitle);
    Vector vecTemp = getDBDatum(); // data fetched fm DB r stored here.
    jlblNewTitle.setText(vecTemp.get(1).toString());
    jlblNewTitle.setBounds(350, 16, 117, 30);
    jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));
    } catch (Exception e) {
    e.printStackTrace();
    }//end of initGUI()
    private Vector getDBDatum() {
    // fetches datum from oracle database and stores it in a vector
    return lvecData;
    }//end of getDBDatum()
    }//end of class
    in index.jsp page i have included the following code for calling this applet:
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
    width="600" height="300">
    <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>
    if i view it in using AppletViewer it runs perfectly and display the data in JLabel. (ie, both jlblTitle and jlblNewTitle).(ie, DATA FETCHES FROM db AND DISPLAYS PROPERLY)
    BUT IF I CLICK ON INDEX.JSP, ONLY jlblTitle APPEARS. jlblnNewTitle WILL BE BLANK(this label name is supposed to fetch from database)
    EVERY THING IS DISPAYING PROPERLY EXCEPT DATA FROM DATABASE!!!
    i signed the applet as follows :
    grant {
    permission java.security.AllPermission;
    Can any body help me to figure out the problem?

    This is the Swing Applet java code
    import java.awt.Dimension;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Vector;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.JScrollPane;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.SwingConstants;
    public class HaiApplet extends javax.swing.JApplet {
         private JLabel     jlblTitle;
         private JLabel     jlblNewTitle;
         private Vector     vec;
         * main method to display this
         * JApplet inside a new JFrame.
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              NewJApplet inst = new NewJApplet();
              frame.getContentPane().add(inst);
              ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
              frame.pack();
              frame.setVisible(true);
         public HaiApplet() {
              super();
              initGUI();
         private void initGUI() {
              try {               
                   this.setSize(542, 701);
                   this.getContentPane().setLayout(null);
                        jlblTitle = new JLabel();
                        this.getContentPane().add(jlblTitle);
                        jlblTitle.setText("OMMS");
                        jlblTitle.setBounds(197, 16, 117, 30);
                        jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
                        jlblTitle.setHorizontalAlignment(SwingConstants.CENTER);
                        jlblTitle.setForeground(new java.awt.Color(0,128,192));
                        jlblNewTitle = new JLabel();
                        this.getContentPane().add(jlblNewTitle);
                        Vector vecTemp = getDBDatum();
                        jlblNewTitle.setText(vecTemp.get(1).toString());
                        jlblNewTitle.setBounds(350, 16, 117, 30);
                        jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));     
              } catch (Exception e) {
                   e.printStackTrace();
         }//end of initGUI()
         private Vector getDBDatum() {
              Vector lvecData = new Vector(10,5);
              Connection lcon = null;
              Statement lstmt = null;
              ResultSet lrsResults = null;
              String lstrSQL = null;
              String lstrOut = null;
              try {
                   OmmsDBConnect db = new OmmsDBConnect();
                   lcon = db.connectDb();
                   lstmt = lcon.createStatement(lrsResults.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   lstrSQL = "select DT_ID from P_DATATABLES";
                   lrsResults = lstmt.executeQuery(lstrSQL);        
                   int i = 0;
                   lrsResults.last();
                   int length = lrsResults.getRow();
                   System.out.println(length);
                   lrsResults.beforeFirst();
                   int recCount = 0;
                   while (lrsResults.next()) {
                        recCount++;
                        lvecData.addElement(new String(lrsResults.getString("DT_ID")));
                   //     System.out.println("ID :  " + lrsResults.getString(1));
                        i++;
                   }System.out.println("here 3 out fm while");
              catch(SQLException e) {
                   System.out.print("SQLException: ");
                   System.out.println(e.getMessage());
              catch(Exception ex) {
                   lstrOut = "Exception Occured " + ex.getMessage();
              finally {
                   try {
                        lrsResults.close();
                        lstmt.close();
                        lcon.close();
                        System.out.println("[DONE]");
                   catch(Exception e) {
                        System.out.println(e);
             }//end of finally
              return lvecData;
         }//end of getDBDatum()
    }//end of classOfcourse the above code compiles and runs well. in Applet Viewer
    I plugged the above Swing Applet in a JSP page index.jsp
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
                   width="600" height="300">
         <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>Every thing is working fine in AppletViewer...But if i view this in any browser, then only the jlblTitle is displaying. jlblNewTitle is not displaying(this label name is actually fetching from thedatabase)
    can any body help me regarding this matter.? Thx in Advance.

  • Help with Account Removal from Skype Directory

    To whom it may concern,
    I need help with removing my Skype account from the Skype Directory.  According to this webpage: https://support.skype.com/en/faq/FA142/can-i-delete-my-skype-account, only someone from Skype Customer Service can remove my account from the directory. Can someone assist me in removing my account from the directory? Thanks.
    Sincerely,
    Andrea

    I am not eligible for email or live chat service with a skype representative... I decided to post in this forum. Thanks anyway.
    afaik, all users can use the email support option.  But as you said you can not use that facility, send an email to their generic email address instead - [email protected]
    CONTACT SKYPE CUSTOMER SERVICE   |  HOW TO RECORD SKYPE VIDEO CALLS  | HOW TO HANDLE SUPICIOUS CALLS AND MESSAGES   |  WINDOWS PROBLEMS TROUBLESHOOTING   |  SKYPE DOWNLOAD LINKS  
    MORE TIPS, TRICKS AND UPDATES AT
    skypefordummies.blogspot.com

  • I need help with a download from Adobe

    I need help with Adode photoshop elements that I bought from Adobe. The download take forever. I can't get signed in very easy. It take forever

    Hi Kathy1963-1964,
    Welcome to Adobe Forum,
    You have photoshop elements 12, you can try downloading without the akamei downloader .
    http://prodesigntools.com/photoshop-elements-12-direct-download-links-premiere.html
    Please read the " very important instruction" prior to downoload.
    I would request you to disable the firewall & the antivirus prior to download.
    Let us know if it worked.
    Regards,
    Rajshree

  • SQL help with calculation uptime from event logs

    Hi guys,
    I'm able to retrieve uptime/downtime info from the eventlogs using the 6005, 6006 events. I just realized that there are cases (dirty shutdowns) where there may not be a shutdown (6006) logged. There will be a 6008 message logged though. I am kinda stumped as to how to match up the 6006 and 6005 messages now to calculate uptime as there might be a few more 6005 messages than 6006. Any ideas. Here's what I have so far: I'm querying the MOM reporting database.
    select t1.computername ServerName,
    t1.computerdomain ComputerDomain,
    t1.timegenerated ShutdownTime,
    (select min(t2.TimeGenerated) from SDKEventView t2
    where t1.ComputerName = t2.computername
    and NTEventID = 6005
    and t2.timegenerated >= t1.TimeGenerated) StartupTime,
    datediff(minute,t1.TimeGenerated, (select min(t2.TimeGenerated) from SDKEventView t2
    where t1.ComputerName = t2.computername
    and NTEventID = 6005
    and t2.timegenerated >= t1.TimeGenerated)) Downtime
    from SDKEventView t1
    where t1.NTEventID = 6006
    and t1.timeGenerated between '5/1/2005 12:00:00.000 AM' and '5/2/2006 12:00:00.000 AM'
    and t1.computername in (select name from sdkcomputerview where name like '%FLK%')
    order by Downtime

    What I would do is create a class with the stored procedure call as one of the methods:
    Class Accessor()
      public UsrObject getUser(String loginId)
         //put stored procedure here>
         //after getting data from database, put into an
         // object you define (ie: UsrObject)
         return UsrObject
    }You have a couple of other issues you need to address (and they may already be taken care of)
    You need to decided if this is a 2-tier or 3-tier architecture. Are you accessing the database directly without going through a middle tier?

Maybe you are looking for