The columns not appear

Here i want to get the columns names in the table "employee" in my database so i used databaseMetaData.getColumns(); but give me this error:
java.sql.SQLException: Column not found
at sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1850)
why this ?
code:
import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.DriverManager; import java.sql.ResultSet; public class ColumnNamesTest {     private static final String DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";     private static final String DRIVER_URL = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};" +             "Dbq=D:\\my _works\\my_works_2010\\JDBC-work\\employeedb\\Database2.mdb";     public ColumnNamesTest() {         Connection connection = null;         //  Statement statement = null;         ResultSet resultSet = null;         try {             Class.forName(DRIVER);             connection = DriverManager.getConnection(DRIVER_URL);             DatabaseMetaData databaseMetaData = connection.getMetaData();             resultSet = databaseMetaData.getColumns(null, null, "Employee", null);             while (resultSet.next()) {                 String colName = resultSet.getString("Column Names");                 System.out.println(colName);             }         } catch (Exception e) {             e.printStackTrace();         }     }     public static void main(String[] args) {         new ColumnNamesTest();     } }
Thanks

A combination of this
getColumnsResultSet getColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern)
throws SQLException
Retrieves a description of table columns available in the specified catalog.
Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_CAT,TABLE_SCHEM, TABLE_NAME, and ORDINAL_POSITION.
Each column description has the following columns:
1. TABLE_CAT String => table catalog (may be null)
2. TABLE_SCHEM String => table schema (may be null)
3. TABLE_NAME String => table name
4. COLUMN_NAME String => column name
5. DATA_TYPE int => SQL type from java.sql.Types
6. TYPE_NAME String => Data source dependent type name, for a UDT the type name is fully qualified
...>
And this
getStringString getString(int columnIndex)
throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
>
Learn to use the API docs.

Similar Messages

  • Cost Element column not appearing in IW31/ IW32 transaction

    Hi,
    In transaction IW32, in Operations Tab --> click on External Button (below shown on IW32 screen).
    Now under External, click on Services tab (1st option), here Cost Estimate column not appearing.
    We tried to add through configuration option on this window. (there shows table setting --> click on administrator, now you can see Edit system settings, here Cost Element - ESLL-KSTAR shown with TICK on Invisible checkbox).
    How can i Untick that. I tried but after activate, it again appears.
    Plz guide..

    Hi,
    Where a cost element exists on the operation External TAB, input of the same data on the service line is not allowed. In that case the system decides that this data field should not be available on the service lines. Where the is no cost element on operation then entry is allowed on service line.
    This program logic is overwriting the field configuration on the table setting for service entry grid. This is why the invisable flag cannot be changed.
    -Paul

  • The Ihone4 not appear in itunes

    The Ihone4 not appear in itunes

    I have the same problem! I was running the latest update in Itunes and the update crashed! Now im stuck with the "Connect to itunes logo" on the phone! No iphone4 in Itunes! Tried both the soft- and hard reset, but no changes!

  • Why do columns not appear in the same order as the fields on my imported form?

    Hello All
    I am an Acrobat X user and make numerous forms through Acrobat.  However, when I import the file into FormsCentral, the order of the fields in the table do not correspond to the order in which they appear on my form.  The fields on my form are in a calendar format so they appear from left-to-right.  I'm wondering if when I do the import, it is read by FormsCentral from top-to-bottom instead or is it random.  It's a real inconvenience and severely inhibits my workflow when I have to rearrange the columns to work with the data.  Any suggestions or insight would be appreciated.
    Thanks
    Daryl

    Files have no order. File management programs like the finder or windows explorer will display files according to your selected display sort. Typically alpha by file name, date created, size, date modified. So to view them in a selected order you need to sort on an attribute that accomplishes that. The easiest usually is to export photos using the sequential naming option then displaying in alpha order
    LN

  • Column not appearing in Answers

    Experts,
    I have a strange problem.
    I am adding a new column in presentation layer in the online rpd.
    When I am reloading the server metadata from Answers, the column is not appearing.
    Any reasons?
    parag

    Hi,
    I think if the column is not appeared in the answers for a particular Subject area, then it could be because of the permissions on the column.
    Go to presentation layer, double click on the column and checkout the object and then click on the permissions TAB and see if the permission is having (X) mark in the checkbox.. If so change it to (tick mark) which indicates it is visible for the users for reporting ..
    Then reload the server metadata and try to see if the column appears..
    Regadrs,
    Naveen.

  • Document ID column not appearing on dispform.aspx

    Hi, when activating this feature at site collection level, the column appears for new library views, but not for the,
    dispform.aspx
    I think this doesn't apply for newform and editform.aspx since you can't edit that part.
    Now, we migrate this site from SharePoint 2007 to 2013, could it be that after migrating and activating this new feature, it can't update that form since that was migrated.
    Any other thoughts?

    Nope.  you're stuck.  That's the way it is.  Two possible solutions:
    Modify the dispform.aspx to include this.  Kinda difficult though now that the page View has been dropped from SharePoint Designer 2013.  You'll have to work in code view only.
    Add a new column.  Create a workflow that is triggered on change that copies the ID value to the new column.  Display the new column on the dispform.aspx. 
    General

  • Pictogram column not appearing View configuration

    Hi,
    We have created a custom Z component and have embedded it into WCC_SLS_HOME by defining a new page configuration and this works find. However the pictograms that are in the default page configuration do not appear in the new page configuration. Furthermore, the column in the configuration screen where one would normally maintain pictograms does not appear. Could this be down to the system patch level or are we looking in looking in the wrong place.
    Sergio
    System Info: SAP CRM ABAP 6.0
    SAP_ABA: Release 700, Level 0014 Highest Support SAPKA70014
    SAP_BASIS: Release 700, Level 0014 Highest Support SAPKA70014

    1) I add a document to a library hosted in the Content Type Hub ....
    Ok I create my library in my other HNSC and upload a test document which I attach to the same Content Type as above  .....
    Spot the difference!!!!!
    Freelance consultant

  • View BIP report with parameter in Dashboard, but the parameter  not appear

    OBIEE 10.3.4.1 on Redhat 5.2.
    I have a BIP report with 3 parameters which work fine in BIP. Now I embedded it in BI Dashboard, but not see the parameter menu when view in Dashboard. Is this the feature, or I missed something.
    Thanks.

    On the BI publisher Report Properties window, for Display Mode, select 'Link'. Then you should see the Report Object appear as a link, save and on the dashboard page when you click that link, the BI publisher report will show with the parameters..
    Thanks,
    Bipuser
    Edited by: BIPuser on Jun 3, 2011 9:36 AM

  • Name of the column not displayed

    Hi,
    My query is made on the Data Provider that has the following fields:
    - Notification Numbers(which I get directly from the Data Provider)
    -Status ('ACT' for Active and 'INACT' for Inactive)
    Now, my report should show:
    - Count of all Notification Numbers(which I have avhieved through replacement path)
    - Count of non-confimed Notification Numbers; which is the 'Count of all Notification Numbers' for which the status is INACT.- I have tried achieveing this by making a Restricted KF on the  'Count of all Notification Numbers'. However, the problem is that when this is displayed in the Report, it does not show the name of the column.
    Need help!
    Thx!

    Hi,
    Just select your restricted keyfigure and hit general tab under that description will be there---Enter your desired description there.
    I hope it helps.
    Regards
    AL

  • In ALV the columns not visible, shows

    Hi experts!
    I have a problem, my WD show an ALV, which has some columns not visible, but the column is shown!!! And i don't know what happen. I set in WDDOINIT method which columns a want see and that set is OK. I have two WD Applications.When a fire one, in the browser i see the selected columns, that's ok. But when a fire the other one, i see all columns.
    Can you help me please?
    Thanks for advance.
    Matías.

    Hi,
    Rather writing it in the WDODINIT, write that piece of code in Component controller and call the same method in the
    Inbound pulgs handlers of the respective view.
    When you are in the same session. WDOINIT is called only once. To avoid this write it in handlers.
    Regards,
    Lekha.

  • NET BOOK VALUE OF THE ASSETS NOT APPEARING IN THE BALANCE SHEET

    Hi,
        I have uploaded the old assets by using the T.code As91, but the values of the assets are not appearing in the Balance Sheet.Please help in solving this issue
    Ramaswamy

    Hi
    After loading the asset thro AS91, there is a transaction OASV thro which you need to update the GL accounts. 
    Thanks
    Ashok
    Assign points to say thanks

  • Air3.0 and the softKeyboard not appearing on Stage.focus = InputTextfield on iOS

    In RC1 of Air3.0 and earlier versions of air, I could summon the softkeyboard for the iPhone/iPad by doing this.
    Create an inputtext field, set it's width and height to 0 to hide it
    Then, when I want to show the soft keyboard, simply do:
    stage.focus = txtCapture;
    Where txtCapture is my input text field. When I wanted to hide it, I would simply set the stage.focus to any other object.
    This worked great until 3.0 was offically released and now the softkeyboard does not appear on the set focus, it ONLY appears if you manually click on the input field itself, but since you can't use center alignment or any other formatting on input text fields for the iOS, I can't let it be seen
    Anyone have any idea how I can get the softkeyboard to appear?

    I think we're experiencing an issue with this:
    We're trying to use the iCade cabinet with an iPad and a Flash application (though this shouldn't affect the problem as the problem can be replicated without any connection or involvement with the iCade unit).
    To make sure that the app is able to respond to the iCade's input (which is a simulation and transmission of certain keystrokes for each input), we create a TextField set off-screen and keep it visible (as this seems to be a requirement), and then we set the stage focus to that TextField. We also invoke requestSoftKeyboard on the TextField.
    I learnt from this thread that setting stage focus isn't required, but I had the same issue as someone else here, in that I read that requestSoftKeyboard isn't supported on iOS - the documentation could be more clear about exactly what this means, like it's been explained here. Besides, setting stage focus should be fine, and not the cause of the issue I'm about to explain.
    We have needsSoftKeyboard=false on the TextField, and after setting that, we request the soft keyboard. The upside is that this appears to prime the runtime to respond to keyboard input regardless of where it's coming from, and the keyboard usually stays hidden. Our problem is that, sometimes on app startup and sometimes up to 15 minutes of idle time later, the soft keyboard appears without prompt or user input.
    Is this intended behaviour? We're only developing this application for iOS, and aren't sure if the issue is perhaps to do with the iOS soft keyboard.
    We also tried handling the soft keyboard events (such as Activate, Activating and Deactivate) to attempt to stopImmediatePropagation and preventDefault. These seem to conflict with our setting focus in the first place, so I don't think we can make use of these. We tried only preventing the event when our target TextField already has focus, but this didn't work, and I think at this point we were really just shooting in the dark!

  • Need to use Group By but only want to group some of the columns not all

    Hello all! I am having some issues here. I am rather new to SQL and I am getting stuck with grouping. I have the query below but I only want to group by these columns, instead of all the columns in my select statement.
    ah.fund,
    ah.dept,
    ah.org,
    ah.acct,
    t.fund,
    t.dept,
    t.org,
    t.acct
    This will eventually go into Oracle reports builder. Is there any way I can archive this at all? The query will return all the t for a given time period, but they need to be grouped by the fully qualified account number which consists of the fund, dept, org and acct columns.
    Thanks in advance!
    SELECT ah.fund,
         ah.dept,
         ah.org,
         ah.acct,
         LPAD(ah.fund,3,0)||LPAD(ah.dept,2,0)||LPAD(ah.org,4,0)||SUBSTR(ah.acct,1,2) acct_no,
         LPAD(ah.fund,3,0)||LPAD(ah.dept,2,0)||LPAD(ah.org,4,0)||ah.acct acct_no1,
         t.fund,
         t.dept,
         t.org,
         t.acct,
         t.ACTIVITY_DATE,
         t.TYPE,
         t.AMT,
         t.description,
         t.TRANS_NO,
         t.RECEIPT_NO,
         DECODE(t.PO_NO,NULL,t.JOURNAL_NO,t.PO_NO) J_NO,
         DECODE(t.WARRANT_NO,NULL,t.WIRE_NO,t.WARRANT_NO) W_NO,
         t.VENDOR_NO,
         v.name||' ' ||v.first_name name,
         MIN(ah.eod_date)
    FROM ah,
         t,
         v
    WHERE ah.fund BETWEEN SUBSTR(:p_acct_from,0,3) AND SUBSTR(:p_acct_to,0,3)
         AND ah.dept BETWEEN SUBSTR(:p_acct_from,4,2) AND SUBSTR(:p_acct_to,4,2)
         AND ah.org BETWEEN SUBSTR(:p_acct_from,6,4) AND SUBSTR(:p_acct_to,6,4)
         AND ah.acct BETWEEN SUBSTR(:p_acct_from,10,5) AND SUBSTR(:p_acct_to,10,5)
         AND FLOOR(ah.acct/10000) IN (6,8)
         AND SUBSTR(ah.acct,3) != '000'
         AND ah.eod_date BETWEEN :p_from_date-1 AND :p_to_date
         AND t.fund (+) = ah.fund
         AND t.dept (+) = ah.dept
         AND t.org (+) = ah.org
         AND t.acct (+) = ah.acct
         AND TO_DATE(t.activity_date, 'dd-mon-yy') >= TO_DATE(:P_FROM_DATE,'dd-mon-yy')
         AND TO_DATE(t.activity_date, 'dd-mon-yy') <= TO_DATE(:P_TO_DATE,'dd-mon-yy')
         AND t.type IN( 'PI','JE','PR','VD','VU','AC','AD')
         AND (
              (:p_year = TO_CHAR(CURRENT_DATE,'YYYY')
              AND (t.po_no IS NULL
              OR (select TO_CHAR(open_date,'YYYY') FROM r WHERE po_no = t.po_no ) = TO_CHAR(CURRENT_DATE,'YYYY') ) )
              OR ((select TO_CHAR(open_date,'YYYY') FROM r WHERE po_no = t.po_no ) = :p_year )
    AND v.vendor_no (+) = t.vendor_no
    GROUP BY ah.fund,
         ah.dept,
         ah.org,
         ah.acct,
         t.fund,
         t.dept,
         t.org,
         t.acct,
         t.ACTIVITY_DATE,
         t.TYPE,
         t.AMT,
         t.description,
         t.TRANS_NO,
         t.RECEIPT_NO,
         DECODE(t.PO_NO,NULL,t.JOURNAL_NO,t.PO_NO),
         DECODE(t.WARRANT_NO,NULL,t.WIRE_NO,t.WARRANT_NO),
         t.VENDOR_NO,
         v.name||' ' ||v.first_name
    ORDER BY LPAD(ah.fund,3,0)||LPAD(ah.dept,2,0)||LPAD(ah.org,4,0)||SUBSTR(ah.acct,1,2),
         LPAD(ah.fund,3,0)||LPAD(ah.dept,2,0)||LPAD(ah.org,4,0)||ah.acct;

    In reports builder you can group the columns without having to group it in your query. It is also known as the break report which contains multiple groups in its data model.
        |            Q_1               |
                      |
                      |
        |       GRP_department         |
        | dept_no                      |
        | dept_name                    |
                      |
                      |
        |         GRP_employee         |
        | emp_no                       |
        | emp_first_name               |
        | emp_last_name                |
        | emp_middle_name              |
        | emp_date_of_birth            |
        | ...                          |
        ------------------------------

  • Column not appearing in the output

    Hello All,
    I need to make changes to the existing workbook. "Line amount" (Detail)cloumn needs to be manipulated
    Line amiountwas selected in the list. But in the output i am not able to see that line amount in the output.
    But if select line amount (sum) i am able to see. Line amount(detail) i am not able to see.
    Please let me know the reason for this.
    Kind Regards,
    Kumar.

    That seems strange to me. Perhaps some kind of security thing. Though you would think if you can see the SUM aggreagate, you should be able to see the DETAIL. Can you even see the DETAIL to pick it from the item list (open the item to see its available choices)? Maybe you are not opening the item to see the aggregate choices and just picking the item, and it is giving you the default choice, which would be SUM most likely? If you can see the DETAIL choice and you pick it, but you don't see it in the query results, I would contact Oracle Support. I would say in such a situation that you must have run across a programming error.
    John Dickey

  • OBIEE  Detail record with all the columns not showing up in drill down

    Hi
    When i drill down in the hierarchy it only shows me the key rather than the full detail record
    M heirarchy is
    Dim
    total
    reckey
    detail
    detailkey
    name
    type
    When i drill down on reckey, it shows only the detailkey and not oher columns. Is there something i am missing here. The physical and logical table has detailkey as the primamykey

    You have a beautiful example in the Oracle By Example Series here :
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html#t2s7
    If you follow the instruction on the Channels Detail_Key in this example, you will succeed
    Success
    Nico

Maybe you are looking for