Error when populating combo box

I tried to display my data in combo box from my access table but my combo box is empty. Here's my code:
<% String temp="";     
     Connection conn = null;
     try
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          conn = DriverManager.getConnection("jdbc:odbc:admin_management");
          Statement stmt = conn.createStatement();
          ResultSet rs = stmt.executeQuery("SELECT Virtual_host_name FROM Server_Info");
%>
<select name="Server_available">
<%
while (rs.next()) {
temp= rs.getString("Virtual_host_name"); %>
<%System.out.println("<OPTION VALUE=" + temp + ">" + temp + "\n");%>
<%}%>
</select>
<!-- HEADER STARTS HERE--->
<%
     catch(SQLException e)
          //out.println("SQLException: " + e.getMessage() + "<BR>");
          while((e = e.getNextException()) != null)
          out.println(e.getMessage() + "<BR>");
     catch(ClassNotFoundException e)
          out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
     finally
          if(conn != null)
     try
          conn.close();
     catch (Exception ignored) {}
%>
Please help me asap. thanks!!

Instead of "System.out.println" try using "out.println"

Similar Messages

  • Report error when using combo box and one text field is empty

    I'm building an interactive pdf in adobe pro 9. My problem is the following: I have one text field where you can enter a numeric code and that is used to populate another text field when I choose an option on one combo box.For example: suppose I write the code 123 in the text field "A" and that the combo box has two options ("data" and "-"). When I select "-", another text field "B" is empty, while when I select "data" i populate the text field "B" using the code entered "A" with the text "data_123". In order to do this I use the standard javascript code in the Format>Custom tab of the combo-box.
    My questions are:
    - how can I prevent the pdf to proceed selecting an option in the combo box when the field "A" is empty?
    - how can I update the field "B" every time that I change the text in "A"? I found that the text is "B" is updated only when I press the selection in the combo box.

    You can set the combo box to read-only in the Validate event of the A field:
    // Validate script for text field
    getField("combo1").readonly = !event.value;
    To update the value of B when A changes, you can expand the script above to something like:
    // Validate script for text field
    var f1 = getField("combo1");
    var f2 = getField("B");
    // If there is an entry in the A field...
    if (event.value) {
        f1.readonly = false;  // Make sure the combo box is activated
        f2.value = f1.value === "-" ? "" : "fa.value + event.value;  // Update the value of field B
    } else {
        f1.readonly = true;  // Deactivate the combo box
        f2.value = f2.defaultValue;  // Reset field B
    You might also want to reset the combo box somewhere in there, but it's not clear to me when you would want to do that.

  • Adobe Acrobat 9: Javascript array populated combo box - Selected answer will not save

    I have a combo box on one of my forms that is populated using a Javascript array.  The combo box is populating just fine, but when an item is selected from that combo box, the selected item does not save when the user saves the document.  Any suggestions as to what the problem is and how it can be corrected?  I am a loss as to where to even begin looking.  Any help is greatly appreciated.
    Thank you.
    Lisa

    You might also want to check the Scripting forum
    http://forums.adobe.com/community/acrobat/acrobat_scripting

  • Populating Combo Box list value In Multiple Row

    Hi,
    i to have the same problem .
    I have used add_list_element to populate the list value of the combo box in multiple row.
    I am selecting the list value from the database where the combo box value will be different for each row. However, when i do this.
    All the previous row combo box list value will follow the combo box value in the last row. How can i resolve this?
    i tried with lov but hasnt had any sucesss.in case of LOV can we make the list to appear automatuically and select a value????i havent had much sucesss over it??
    is thr any work around for this apart from lov?

    Hi,
    which product or technology are you talking about ?
    Frank

  • Error reading a combo box in SBO 2004

    Hi
    I am trying to check if someone has selected a value in a combo box on the service call screen (origin field). I can read the value fine if the combo box has a value in it, but if the box is empty I get an error 'object variable or with block variable not set'
    Can anyone suggest anything please ?
    Regards Andy

    Hi John
    Thanks for your idea, I will give that a go
    Regards Andy

  • Populating combo boxes

    hi all,
    can any one help me in writing code for populating one combobox depending on selection in another combo box in java or javascript
    like country,state,city in address
    by selecting particular country in country combo box ,states belongs to that country should be populated in state combo box.
    please help me out which driving me mad
    Thank you for ur reply

    Haii arptihaa...
    The correct place to check for user attempts is after else condition of your login validation. Ie is a user login attempt will be checked once the login is failed.
    ie code some what look like this..
    session=request.getSession();
    if(validate user){}
    else
      Integer k=(Integer) session.getAttribute("userAtmpt");
      if(k==null)  //If the user is attempting for the first time
               k=new Integer(0);
            session.setAttribute("userAtmpt",k)
            url="login.jsp"
        else //If this is not first attempt
                  if(k.intValue>=3)  //if the user exceeds the no of attempts
                         url="lock.jsp";
                   else
                          k=new Integer(k.intValue()+1);
                          url="login.jsp"
    }Arpitha, I am not sure abt the syntax but logically it should be correct. Try get the flow and implement, u will get...
    regards
    Shanu

  • Error when populating dimension

    I encountered the following error when trying to populate a dimension in Analytic Workspace Manager:
    action BUILDDATABASE failed on object <analytic_workspace>
    Does anyone know what that means?

    1) No SKEY_VAL is not a variable.
    2) This is my first attempt at using ODI, I did not create the SQL. All I did was to create a reverse a model against my MSSQL staging database and create and reverse a model against the planning application. Then I created an interface for the Account dimension in planning mapped the account, parent and description columns from my SQL table to the Planning dimension and I get this error. There are no columns called SKEY_VAL in either the source or the target and I have not created any objects with this name in ODI. I can see that ODI is asking for this column when I execute the interface, but I don't know why.

  • Error when populating cache with data.

    Hi,
    I am new to Oracle coherence. I was just following the examples at the following link:
    http://download.oracle.com/docs/cd/E15357_01/coh.360/e15831/toc.htm
    I am stuck at the following chapter:
    5.2 Populating a Cache with Domain Objects
    I am able to run the DataGenerator.java successfully. The contacts.csv file gets created.
    When i run the LoaderExample.java, i get the following output:
    Work: NE
    77596
    Yoyodyne Propulsion Systems, Grover's Mill US
    330 Lectroid Rd.
    Telephone Numbers
    work: +11 927 20 4526527
    home: +11 633 82 6834859
    Birth Date: 1964-01-03
    Exception in thread "main" (Wrapped) java.io.NotSerializableException: com.oracle.handson.ContactId
         at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:215)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService$ConverterKeyToBinary.convert(PartitionedService.CDB:29)
         at com.tangosol.util.ConverterCollections$AbstractConverterEntry.getKey(ConverterCollections.java:3387)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.splitEntriesByOwner(PartitionedService.CDB:17)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.ensureRequestTarget(PartitionedCache.CDB:18)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.putAll(PartitionedCache.CDB:34)
         at com.tangosol.util.ConverterCollections$ConverterMap.putAll(ConverterCollections.java:1607)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.putAll(PartitionedCache.CDB:1)
         at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
         at com.oracle.handson.LoaderExample.load(LoaderExample.java:105)
         at com.oracle.handson.LoaderExample.main(LoaderExample.java:37)
    Caused by: java.io.NotSerializableException: com.oracle.handson.ContactId
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeObject(Unknown Source)
         at com.tangosol.util.ExternalizableHelper.writeSerializable(ExternalizableHelper.java:2216)
         at com.tangosol.util.ExternalizableHelper.writeObjectInternal(ExternalizableHelper.java:2664)
         at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2564)
         at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:211)
         ... 10 more
    2010-11-15 16:20:04.741/4.812 Oracle Coherence GE 3.6.0.0 <D4> (thread=ShutdownHook, member=4): ShutdownHook: stopping cluster node
    2010-11-15 16:20:04.772/4.843 Oracle Coherence GE 3.6.0.0 <D5> (thread=DistributedCache, member=4): Service DistributedCache left the cluster
    Can anyone please help me as to why i am getting this error?
    I am unable to move forward to the next example due to this error.
    Any ideas would be of great help.
    Thanks

    Can you post the code for the ContactId class? I suspect you have forgotten to implement one of the PortableObject, Serializable, Externalizable, or ExternalizableLite interfaces. If that isn't it are you telling Coherence to use POF?
    -Dtangosol.pof.enabled=true -Dtangosol.pof.config=pof-config.xmlEdited by: Willy Myers on 15-Nov-2010 04:02

  • Geeting error when select UoM BOX- entry is too long

    Hi ,
    While creating SC , using F4 Unit of measurement , when selected BOX,
    system gives entry too long error message.
    Please suggest , how we can  rectify this,
    Thank you
    Nilesh

    Did you check the following OSS note...OSS Note 1474124?

  • Invalid column name 'SKEY_VAL' Error when Populating a planning dimension

    I'm trying to populate a planning dimension from a view in MSSQL. I thought that I had mapped the all of the required columns in my interface in ODI, but I am getting the following error:
    207 : S0001 : com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'SKEY_VAL'.
    I can see in Operator that ODI is generating the following SQL
    select     
         LEFT(DIM_ACCOUNT.FLEX_VALUE,80)     as C1_ACCOUNT,
         DIM_ACCOUNT.PARENT_FLEX_VALUE     as C2_PARENT,
         LEFT(DIM_ACCOUNT.DESCRIPTION,80)     as C3_DESCRIPTION,
         LEFT(DIM_ACCOUNT.DESCRIPTION,80)     as C4_ALIAS__DEFAULT,
         SKEY_VAL
    from     DOT_STAGE.dbo.DIM_ACCOUNT_T_V as DIM_ACCOUNT
    where     (1=1)
    But I don't know why it is asking for the SKEY_VAL column or how I can map a value into this column when setting up the interface?
    I've read through the user guide and the getting started guide and I can't find any reference to this SKEY_VAL column.
    Does anyone know what causes this error and how I can fix it?

    1) No SKEY_VAL is not a variable.
    2) This is my first attempt at using ODI, I did not create the SQL. All I did was to create a reverse a model against my MSSQL staging database and create and reverse a model against the planning application. Then I created an interface for the Account dimension in planning mapped the account, parent and description columns from my SQL table to the Planning dimension and I get this error. There are no columns called SKEY_VAL in either the source or the target and I have not created any objects with this name in ODI. I can see that ODI is asking for this column when I execute the interface, but I don't know why.

  • Combo box in form manager

    Hi!
    I've made a form in Designer 8 with combo box, tested it (everything was ok) and than upload it to form manger. And here the problem beggins. When I'm writting something in combo boxes field it looks like there wasn't any or sometimes I can write only 10 letters when the Combo Box was set up for 11. Why is that? I want to use Combo Boxes. Is it a bug of FM? Thanks.

    VC,
    Have you had a chance to add an example? I checked your application and could not find the combo box in tabular form.
    Robert
    http://apexjscss.blogspot.com

  • Response to mouse click by combo box list and underlying clickable label

    Hello,
    we developed a label responding to a mouse click by opening and thereby displaying an associated help text. The label extends a project specific hierarchy of labels and thus implements MouseListener, of course. Now we encountered a strange problem: It occurs when a combo box is placed above such a label in a panel. By clicking the combo box a selective list drops down and covers the label. As soon as a mouse click is performed on a list item directly covering (i.e., right in front of) the clickable label not only this item is selected but the help screen associated with the underlying label is displayed, too. So the mouse click is processed twice: as proposed by the combo box and unwantedly by the label. This behaviour could not be reproduced on other components being placed below a combobox. So the label itself seems to be the cause but we cannot imagine what could exactly be the reason for this double reaction. Perhaps anyone heard of something like that?
    We are currently working with IBM Visual Age for Java 2.0 (Java version 1.1.8 with the according Swing version). The clickable label reflectively calls methods of a model to determine whether help is available and if so later on to open this help text.
    Any help is appreciated!
    Danilo

    Thank you for your response. I tried both to check the focus and to consume the event. But I had to learn that labels are not able to catch the focus. I also was not able to consume an appropriate event of the combobox. So I finally solved the problem by extending JButton and implementing ActionListener. Thus my labels are actually buttons but I changed their appearance and behaviour so one cannot distinguish them from labels.

  • Default Selection in Combo Box

    Hi,
    I have a query regarding combo box. I have populated combo box using UserDataSources. Is it possible to make a default selection of an Item in combo box.
    Regards
    Ronald

    Hi Ronald,
                   I  hope the following code helps
                           Dim oComboVal1 As SAPbouiCOM.ComboBox
                           Dim oCol As SAPbouiCOM.Column
                           oCol = oMatrix.Columns.Item("V_12")
                            oComboVal1 = oCol.Cells.Item(Row).Specific
                            oComboVal1.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
                            here
    Regards
    V.Rangarajan

  • Combo Box  - Font on Closed

    Hi
    I changed the font using
    _global.styles.ComboBox.fontFamily = "AAA";
    where ASU is an embedded font
    The font displays correctly when the combo box is open but
    closed it still show the default _sans
    Anyone help on changing the display font when closed?
    Many thanks
    Mark

    Try this:
    import mx.styles.CSSStyleDeclaration;
    _global.styles.ComboBox = new CSSStyleDeclaration();
    _global.styles.ComboBox.setStyle("fontFamily","AAA");
    Tim

  • Analyzer Combo Boxes

    Hi there,<BR><BR>When putting Combo Box Subscriptions onto Analyzer reports is there any way to ONLY show members that have data held againt then?<BR><BR>For example:<BR><BR>Multi level combo box....<BR><BR>1st Level: Name<BR><BR>2nd Level: Accounts<BR><BR>When selecting the name, can we only show accounts that have data against them? SOmetimes there maybe upto 1,000 accounts held against a name, but only 2 of them have any data held against them, so its a bit of a waste!<BR><BR>The excel spreadsheet addin does this fine by using suppress 0 or #Missing values, can we do the same for COMBO BOXES in Analyzer (not charts, spreadsheets etc..)<BR><BR>Cheers

    Thanks for the reply mate. It was a bit of a long shot but no harm in askin <img src="i/expressions/face-icon-small-wink.gif" border="0"><BR><BR>Your idea sounds very useful and will give it a whirl.<BR><BR>Thanks again! <img src="i/expressions/beer.gif" border="0"><BR><BR><blockquote>quote:<br><hr><i>Originally posted by: <b>garycris</b></i><BR>I have not seen that functionality. It would be nice. But since a combo box is dimension specific and you would need to evaluate the intersections of that dimesnion with every other dimension to determine if in fact it was a NULL value being returned, I can see where it could pose some issues. To get around it, I usually put the top member in the drop down with children (descendants, etc) seelcted and then move the dim onto the rows and use Suppress Missing. When they select from the drop down they only get the ones that have values and then I tell them to use right click keep only for the one they want.<hr></blockquote><BR><BR>

Maybe you are looking for

  • Problem in importing a dump file

    i have got a dump file exported from one system. i try to import into my database (anotehr system) but an error exists SQL> imp sys/sys file='C:\INVSYS.DMP'; SP2-0734: unknown command beginning "imp sys/sy..." - rest of line ignored. i dont have the

  • TCode to Find Sales Orders - based on Sales Organization & Material inputs

    Hi Experts I need to pull out all the sales orders raised with different sales organizations on different materials. Is there any T-Code to pull out the data at one go u2013 instead of giving each material and each organization value one by one? Exam

  • Won't download songs automatically!

    The ipod is not showing up on itunes have kept on plugging the usb in and out for a couple of times now but i got nothing please help!!!! Nano???   Windows XP  

  • SLOC not transferred to lines items from Default Settings (SRM 3.0)

    When creating a shopping cart via bbpsc01, an SLOC is selected via F4 help (reads from R/3 backend).  The SLOC is not populated down to the line items in the Shopping Cart. This functioned prior to application of BBPCRM support stack 8. Response from

  • Leopard always boots into Safe Boot

    Every time I restart Leopard it boots into "Safe Boot" mode. To get it to boot into regular mode I have to keep hitting "x" after the startup sound while booting. I read that Leopard shouldn't boot into safe mode unless I hold down the shift key when