Question about ResultSet Columns

Do resultset columns start at index 0 or 1???

From the [url http://java.sun.com/j2se/1.5.0/docs/api/java/sql/ResultSet.html]API docs
The ResultSet interface provides getter methods (getBoolean, getLong, and so on) for retrieving column values from the current row. Values can be retrieved using either the index number of the column or the name of the column. In general, using the column index will be more efficient. Columns are numbered from 1. For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.

Similar Messages

  • A question about ResultSet.UpdateObject(int column, Object x)

    hi, I write some code which use the TableModel to represent the data fetched from MS-ACCESS.
    the problem is about the UpdateObject(...) method which is in the implement of the AbstractTableModel method setAtValue(). when transfered OBJECT TYPE is java.lang.String, I can't get the correct result in the JTable view.
    my code is as below, could somebody point me out my problem
    public class MyTableModel extends AbstractTableModel {
        private ResultSet rs ;
        private ResultSetMetaData rsmd;
        /** Creates a new instance of MyTableModel */
        public MyTableModel() {
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            } catch (ClassNotFoundException ex) {
                ex.printStackTrace();
            String url = "jdbc:odbc:CoffeeBreak";
            try {
                Connection con = DriverManager.getConnection(url,"","");
                String strSQL = "SELECT * FROM COFFEES";
                Statement pSt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
                rs = pSt.executeQuery(strSQL);
                rsmd = rs.getMetaData();
            } catch (SQLException ex) {
                ex.printStackTrace();
    /* table model retrieve the Class type of a column method here*/
    public Class getColumnClass(int c){
            try {
                return Class.forName(rsmd.getColumnClassName(c+1));
            } catch (ClassNotFoundException ex) {
                ex.printStackTrace();
            } catch (SQLException ex) {
                ex.printStackTrace();
            return String.class;
    //method of update database and JTable after user edited a table cell
    public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
            try {
                int concurrency = rs.getConcurrency();
                if(concurrency == 1008){
                    rs.absolute(rowIndex+1);    //the JTable row index is start from 0,so plus 1
                    rs.updateObject(columnIndex+1, aValue);//the JTable column index is start from 0, so plus 1
                    rs.updateRow();
            } catch (SQLException ex) {
                ex.printStackTrace();
        }when the column type is about java.lang.String, the cell's result is incorrect, it looks like "[B@1f8f72f" and database can't update.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    It's me again.
    I post the whole class code here
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.AbstractTableModel;
    * @author qhj
    public class MyTableModel extends AbstractTableModel {
        /** Creates a new instance of MyTableModel */
        private ResultSet rs ;
        private ResultSetMetaData rsmd;
        private Statement pSt;
        private String strSQL;
        public MyTableModel() {
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            } catch (ClassNotFoundException ex) {
                ex.printStackTrace();
            String url = "jdbc:odbc:CoffeeBreak";
            try {
                Connection con = DriverManager.getConnection(url,"","");
                strSQL = "SELECT * FROM COFFEES";
                pSt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
                rs = pSt.executeQuery(strSQL);
                rsmd = rs.getMetaData();
            } catch (SQLException ex) {
                ex.printStackTrace();
        public int getRowCount() {
            try {
                rs.last();
                return rs.getRow();
            } catch (SQLException ex) {
                ex.printStackTrace();
            return 0;
        public int getColumnCount() {
            try {
                return rsmd.getColumnCount();
            } catch (SQLException ex) {
                ex.printStackTrace();
            return 0;
        public Object getValueAt(int rowIndex, int columnIndex) {
            try {
                rs.absolute(rowIndex+1);
                return rs.getObject(columnIndex+1);
            } catch (SQLException ex) {
                ex.printStackTrace();
            return null;
        public String getColumnName(int column){
            try {
                return rsmd.getColumnName(column+1);
            } catch (SQLException ex) {
                ex.printStackTrace();
            return "N/A";
        public Class getColumnClass(int c){
            try {
                return Class.forName(rsmd.getColumnClassName(c+1));
            } catch (ClassNotFoundException ex) {
                ex.printStackTrace();
            } catch (SQLException ex) {
                ex.printStackTrace();
            return String.class;
        public boolean isCellEditable(int row, int col) {
            //Note that the data/cell address is constant,
            //no matter where the cell appears onscreen.
            return true;
        public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
            try {
                int concurrency = rs.getConcurrency();
                if(concurrency == 1008){
                    rs.absolute(rowIndex+1);
                    rs.updateObject(columnIndex+1, aValue);
                    //rs.updateRow();
                    //rs = pSt.executeQuery(strSQL);
            } catch (SQLException ex) {
                ex.printStackTrace();
            fireTableDataChanged();
    }

  • Question about resultset

    Hi,
    I have a simple problem. I wish to move data from a resultset to a string[]. However, I do not know the number of rows in the resultset.
    I have tried something like this:
    while (resultset.next()) {
                while ( (sqlData[rowCount++] = resultset.getString(++colCount))){}
                           colCount = 0;
    }Javac said it expected a boolean and not a string. Well of course it requiers a boolean, but isn't a boolean returned if the operation on the resultset isn't possible?
    All help appriciated...
    Karl XII

    It is possible to retrieve the number of rows from a resultset --
    Statement stmt= con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                        ResultSet.CONCUR_READONLY);
    ResultSet rs= stmt.executeQuery("<your select query here>");
    int totalRows;
    if (rs.last()) // can it move to the last row?
       totalRows= rs.getRow(); // get its row number
    else
       totalRows= 0; // no rows in the resultset
    rs.first() // set the cursor back to the startNote that the resultset has to be scrollable (TYPE_SCROLL_INSENSITIVE).
    kind regards,
    Jos

  • Question about setting column width in SQL*Plus using info retrieved w SQL

    Good morning,
    Is there a way to tell SQL*Plus to set the width of a column to the greatest width of the elements found in the column ? (as opposed to the default which is the width declared in the DDL)
    In other words, I'd like to do something functionally equivalent to this:
    COL <columname> format a[select max(length(<columnname>)) from <thetablethatcontainscolumname>]
    I'm doing the above manually in two steps
    1. select max(length(columnname)) from .....
    2. col columnname format a[resultofstep1]
    Is there a way of doing it in one step ?
    Thank you for your help,
    John.

    Hi Munky,
    >
    you should consider whther you are using the correct tool for the job, SQLplus isn't exactly ideal for doing presentation layer stuff
    >
    I'm not really doing presentation stuff, I asked because it would be very convenient for everyday stuff. I commonly query the tables that I am going to deal withm just to have a look at the column names and a few values, something like:
    select * from EMP where rownum <= 10; -- just to have a look at the table and some values
    when the table contains a wide column then the display gets all messed up. It would be nice to have an option or a mechanism to tell SQL*Plus to automatically use the width of the widest value, instead of having to determine the value and then manually set the column.
    thank you for your help, it's good to know that I didn't miss some trivial setting in the documentation that would do it ;)
    John.

  • A question about ResultSet

    Does anyone can tell me how to use ResultSet.getDate(String field, Calendar cal)method,, I have tried many way,,, but if I use this method, everytime throw a AbstractMethodError... thanks

    Calendar calendar = Calendar.getInstance();
    while(rs.next){
    rs.getDate("SYSDATE", calendar);
    and SYSDATE is a kind of DATE
    java.lang.AbstractMethodError occur while I run
    rs.getDate() Method ..
    is this a bug of java???It may simply be that the driver you are using doesn't support this method. Which driver and version are you using?
    Col

  • Question about Break Columns on Tabular Form

    is it possible to have the following result on apex Tabular Form while doing Break Columns ??
    To place one blank line between departments, enter the following command:
    BREAK ON DEPARTMENT_ID SKIP 1
    Now rerun the query:
    DEPARTMENT_ID LAST_NAME                     SALARY
               20 Hartstein                      13000
               80 Russell                        14000
                  Partners                       13500
               90 King                           24000
                  Kochhar                        17000
                  De Haan                        17000
    6 rows selected.The result achieved was not as expected, the sample is hosted on https://apex.oracle.com/pls/apex/f?p=10037 demo/1234 please help
    Region Source :
    select DEPTNO, EMPNO, ENAME, JOB,MGR, HIREDATE, SAL,COMM
    from "#OWNER#"."EMP"Report Attributes :
    Break Columns - First Column

    LTaura wrote:
    what does the built-in tabular form and break functionality do ?The built-in tabular form wizard generates the tabular form report and ApplyMRU and ApplyMRD processes to handle the submitted form.
    The report renders the retrieved data values as HTML form controls to enable them to be edited by the user. The <tt>DEPTNO</tt> in from the first row in your query is rendered thus:
    &lt;input type="text" name="f01" size="16" maxlength="2000" value="10" id="f01_0001" autocomplete="off"&gt;and that in the second row as:
    &lt;input type="text" name="f01" size="16" maxlength="2000" value="10" id="f01_0002" autocomplete="off"&gt;Since these are not exactly the same (different <tt>id</tt> attributes), the built-in break formatting sees them as different values, so no report break is applied.
    However, even if this was not the case and the break was applied to give only 3 text items for the 3 <tt>DEPTNO</tt> values, the ApplyMRU and ApplyMRD processes expect a <tt>DEPTNO</tt> value to be submitted for each row, and would fail for the subordinate <tt>EMP</tt> rows where it was missing.

  • 2 Questions about ResultSet

    Q1. Do I need to ( Or should I for good programming practice ) explicitly close a ResultSet ?
    Q2. Does a ResultSet contain retrieved records from the query or a list of "pointers" to records which are retrieved from the DB only as the ResultSet is walked through?
    Thanks ..... J

    Q1. Do I need to ( Or should I for good programming
    practice ) explicitly close a ResultSet ?You should, and sometimes you need to, e.g. to avoid getting a "too many open cursors" database error when using lots of ResultSets within a short span of time.
    Q2. Does a ResultSet contain retrieved records from
    the query or a list of "pointers" to records which
    are retrieved from the DB only as the ResultSet is
    walked through?Depends on the implementation. Typically, it does contain some (if not all) records. Other data (e.g. BLOBs) might be read in streaming mode.

  • Question about formula column

    Trying to use formula column with an nvl. The problem is that if the record is not there the nvl will not work. How do I force the formula column to return something when the record is not there. Below is the formula.
    function CF_1FORMULA0028 return Char is
    myComments varchar(50);
    begin
    select nvl(erActRelData.VALUE,'') into myComments
              from      dpss_gdats.er_activity eractivity,
                                  dpss_gdats.er_activity_relevant_data erActRelData,
                                  dpss_gdats.er_activity_rel_data_name erActRelDataName
                   where eractivity.er_case_id = :case_number
                   and eractivity.date_created is not null
                   and eractivity.ER_ACTIVITY_ID = erActRelData.ER_ACTIVITY_ID
                   and erActRelData.ER_ACTIVITY_REL_DATA_NAME_ID = erActRelDataName.ER_ACTIVITY_REL_DATA_NAME_ID
                   and erActRelDataName.NAME = 'Comments';     
                        return myComments;
    end;

    Modify the last statement to
    return nvl(myComments,'Null Value');

  • Question about histogram types

    Hi there,
    I have question about HISTOGRAM column in ALL_TAB_COLUMNS.
    There are 3 different histogram modes in all_tab-columns.:
    NONE, FREQUENCY , and HEIGHT BALANCED .
    Has anyone knows about these options in detail and how can I change between
    these?
    Thanks.

    And Wolfgang Breitling's papers are always the best resources about histogram.
    http://www.centrexcc.com/papers.html

  • Some questions about Muse

    First of all, I would like to say that I am very impressed with how well Muse works and how easy it was to create a website that satisfies me. Before I started a daily updated website I thought I would encounter many problems I will not be able to solve. I have only had a few minor issues which I would like to share with you.
    The most problems I have with a horizontal layouts (http://www.leftlane.pl/sty14/dig-t-r-3-cylindrowy-silnik-nissana-o-wadze-40-kg-i-mocy-400- km.html). Marking and copying of a text is possible only on the last (top) layer of a document. The same situation is with widgets or anything connected with rollover state - it does not work. In the above example it would be perfect to use a composition/tooltip widget on the first page. Unfortunately, you cannot even move the cursor into it.
    It would be helpful to have an option of rolling a mouse to an anchor (like in here http://www.play.pl/super-smartfony/lg-nexus-5.html and here http://www.thepetedesign.com/demos/onepage_scroll_demo.html).  I mean any action of a mouse wheel would make a move to another anchor/screen. It would make navigation of my site very easy.
    Is it possible to create a widget with a function next anchor/previous anchor? Currently, in the menu every button must be connected to a different anchor for the menu to be functional.
    A question about Adobe Muse. Is it possible to create panels in different columns? It would make it easier to go through all the sophisticated program functions.
    The hits from Facebook have sometimes very long links, eg.
    (http://www.leftlane.pl/sty14/mclaren-p1-nowy-krol-nurburgring.html?fb_action_ids=143235557 3667782&fb_action_types=og.likes&fb_source=aggregation&fb_aggregation_id=288381481237582). If such a link is activated, the anchors in the menu do not work on any page. I mean the backlight of an active state, which helps the user to find out where on page they currently are. The problem also occurs when in the name of a html file polish fonts exist. And sometimes the dots does not work without any reason, mostly in the main page, sometimes in the cooperation page either (http://www.leftlane.pl/wspolpraca/). In the first case (on main page), I do not know why. I have checked if they did not drop into a state button by accident,  moved them among the layers, numbered them from scratch and it did not help. In the cooperation page, the first anchor does not work if it is in Y axle set at 0. If I move it right direction- everything is ok.
    The text frame with background fill does not change text color in overlay state (http://www.leftlane.pl/sty14/nowe-mini-krolestwo-silnikow-3-cylindrowych.html). I mean a source button at the beginning of every text. I would like a dark text and a light layer in a rollover, but  the text after export and moving cursor into it does not change color for some reason.
    I was not sure whether to keep everything (whole website) in one Muse file (but I may be mistaken?). I have decided to divide it into months. Everyone is in a different Muse file. If something goes wrong, I will not have any trouble with an upload of a whole site, which is going to get bigger and bigger.
    The problem is that every file has two master pages. Everything works well up to the moment when I realize how many times I have to make changes in upper menu when I need to add something there. I have already 5 files, every with 2 masters. Is there any way to solve this problem? Maybe something to do with Business Catalyst, where I could connect a menu to every subpage independently, deleting it from Muse file? Doing so I would be able to edit it everywhere from one place. It would make my work much easier, but I have no idea jendak how to do it.
    The comments Disqus do not load, especially at horizontal layouts  (http://www.leftlane.pl/sty14/2014-infiniti-q50-eau-rouge-concept.html). I have exchanged some mails and screenshots with Disqus help. I have sent them a screenshot where the comments are not loaded, because they almost never load. They have replied that it works at their place even with attached screenshot. I have a hard time to discuss it, because it does not work with me and with my friends either. Maybe you could fix it? I would not like to end up with awful facebook comments ;). The problem is with Firefox on PC and Mac. Chrome, Safari and Opera work ok.
    YouTube movie level layouts do not work well with IE11 and Safari 7 (http://www.leftlane.pl/sty14/wypadki-drogowe--004.html). The background should roll left, but in the above mentioned browsers it jumps up. Moreover the scrolling with menu dots is not fluent on Firefox, but I guess it is due to Firefox issues? The same layout but in vertical version rolls fluently in Firefox (http://www.leftlane.pl/sty14/polskie-wypadki--005.html).
    Now, viewing the website on new smartphones and tablets. I know it is not a mobile/tablet layout, but I tried to make it possible to be used on mobile hardware with HD (1280) display. I mean most of all horizontal layouts (http://www.leftlane.pl/sty14/2015-hyundai-genesis.html), where If we want to roll left, we need to roll down. Is there a way to make it possible to move the finger the direction in which the layout goes?
    On Android phones (Nexus 4, Android 4.4.2, Chrome 32) the fade away background effect does not work, although I have spent a lot of time over it (http://www.leftlane.pl/lut14/koniec-produkcji-elektrycznego-renault-fluence-ze!.html). It is ok on PC, but on the phone it does not look good. A whole picture moves from a lower layer instead of an edge which spoils everything.
    This layout does not look good on Android (http://www.leftlane.pl/sty14/nowe-mini-krolestwo-silnikow-3-cylindrowych.html#a07). The background does not fill the whole width of a page. There are also problems with a photo gallery, where full screen pictures should fill more of a screen.
    Is it possible to make an option of  scroll effects/motions for a fullscreen slideshow widget thumbnails (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a06)? It would help me with designing layouts. Currently, it can go from a bottom of a page at x1 speed or emerge (like in this layout) by changing opacity. Something more will be needed, I suppose.
    Sometimes the pictures from gallery (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a06 download very slowly. The website is hosted at Business Catalyst. I cannot state when exactly it happens, most of the time it works ok.
    I really like layouts like this (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a03). On the top is a description and a main text, and the picture is a filled object with a hold set at the bottom edge. That is why there is a nice effect of a filling a whole screen- nevertheless the resolution that is set. It works perfect on PC, but on Android the picture goes beyond the screen. You can do something about it?
    In horizontal layouts (http://www.leftlane.pl/sty14/dig-t-r-3-cylindrowy-silnik-nissana-o-wadze-40-kg-i-mocy-400- km.html) holding of a filling object does not work. Everything is always held to upper edge of a screen regardless the settings. Possibility of holding the picture to the bottom edge or center would make my work much easier.
    According to UE regulations we have to inform about the cookies. I do not know how to do it in Muse. I mean, when the message shows up one time and is accepted, there would be no need to show it again and again during another visit on the website. Is there any way to do it? Is there any widget for it maybe?
    The YouTube widget sometimes changes size just like that. It is so when the miniature of the movie does not load, and the widget is set to stroke (in our case 4 pixels, rounded to 1 pixel). As I remember ( in case of a load error) it extends for 8 pixels wide.
    Last but not least - we use the cheapest hosting plan in Business Catalyst. The monthly bandwidth is enough, although we have a lot of pictures and we worried about it at first. Yet we are running out of the disk storage very quickly. We have used more than a half of a 1 GB after a month. We do not want to change BC for a different one, because we like the way it is connected with Muse. But we do not want to buy the most expensive package - but only this one has more disk space. We do not need any other of these functions and it would devastate our budget. Do we have any other option?
    I’m using Adobe Muse 7.2 on OS X 10.9.1.
    and I'm sending Muse file to <[email protected]>

    Unfortunatley, there is no way to get a code view in Muse. I know quite a few people requested it in the previous forum, but not really sure where that ended up. Also, you may not want to bring the html into DW unless you only have 1 or 2 small changes 2 make. Two reasons. First, it isnt backwards compatible, so if you are planning on updating that site in Muse, you will need to make those changes in DW everytime you update. Second, by all accounts the HTML that Muse puts out is not pretty or easy to work with. Unlike you, I am code averse, but there was a lenghty discussion on the previous forum on this topic. I know they were striving to make it better with every release, just not sure where it is at this point.
    Dont think I am reading that second question right, but there was a ton of info on that old site. You may want to take a look there, people posted a ton of great unique solutions, so it worth a look.
    Here is the link to the old forums- http://support.muse.adobe.com/muse

  • A question about the impact of SQL*PLUS SERVEROUTPUT option on v$sql

    Hello everybody,
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0  Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    OS : Fedora Core 17 (X86_64) Kernel 3.6.6-1.fc17.x86_64I would like to ask a question about the SQL*Plus SET SERVEROUTPUT ON/OFF option and its impact on queries on views such as v$sql and v$session. Here is the problem
    Actually I define three variables in SQL*Plus in order to store sid, serial# and prev_sql_id columns from v$session in order to be able to use them later, several times in different other queries, while I'm still working in the current session.
    So, here is how I proceed
    SET SERVEROUTPUT ON;  -- I often activate this option as the first line of almost all of my SQL-PL/SQL script files
    SET SQLBLANKLINES ON;
    VARIABLE mysid NUMBER
    VARIABLE myserial# NUMBER;
    VARIABLE saved_sql_id VARCHAR2(13);
    -- So first I store sid and serial# for the current session
    BEGIN
        SELECT sid, serial# INTO :mysid, :myserial#
        FROM v$session
        WHERE audsid = SYS_CONTEXT('UserEnv', 'SessionId');
    END;
    PL/SQL procedure successfully completed.
    -- Just check to see the result
    SQL> SELECT :mysid, :myserial# FROM DUAL;
        :MYSID :MYSERIAL#
           129   1067
    SQL> Now, let's say that I want to run the following query as the last SQL statement run within my current session
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;According to Oracle® Database Reference 11g Release 2 (11.2) description for v$session
    http://docs.oracle.com/cd/E11882_01/server.112/e25513/dynviews_3016.htm#REFRN30223]
    the column prev_sql_id includes the sql_id of the last sql statement executed for the given sid and serial# which in the case of my example, it will be the above mentioned SELECT query on the employees table. As a result, right after the SELECT statement on the employees table I run the following
    BEGIN
        SELECT prev_sql_id INTO :saved_sql_id
        FROM v$session
        WHERE sid = :mysid AND serial# = :myserial#;
    END;
    PL/SQL procedure successfully completed.
    SQL> SELECT :saved_sql_id FROM DUAL;
    :SAVED_SQL_ID
    9babjv8yq8ru3
    SQL> Having the value of sql_id, I'm supposed to find all information about cursor(s) for my SELECT statement and also its sql_text value in v$sql. Yet here is what I get when I query v$sql upon the stored sql_id
    SELECT child_number, sql_id, sql_text
    FROM v$sql
    WHERE sql_id = :saved_sql_id;
    CHILD_NUMBER   SQL_ID          SQL_TEXT
    0              9babjv8yq8ru3    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;Therefore instead of
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;for the value of sql_text I get the following value
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES);Which is not of course what I was expecting to find in v$sql for the given sql_id.
    After a bit googling I found the following thread on the OTN forum where it had been suggested (well I think maybe not exactly for the same problem) to turn off SERVEROUTPUT.
    Problem with dbms_xplan.display_cursor
    This was precisely what I did
    SET SERVEROUTPUT OFFafter that I repeated the whole procedure and this time everything worked pretty well as expected. I checked SQL*Plus documentation for SERVEROUTPUT
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Could anyone kindly make some clarification?
    thanks in advance,
    Regards,
    Dariyoosh

    >
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Hi Dariyoosh,
    SET SERVEROUTPUT ON has the effect of executing dbms_output.get_lines after each and every statement. Not only related to system view.
    Here below what Tom Kyte is explaining in this page:
    Now, sqlplus sees this functionality and says "hey, would not it be nice for me to dump this buffer to screen for the user?". So, they added the SQLPlus command "set serveroutput on" which does two things
    1) it tells SQLPLUS you would like it <b>to execute dbms_output.get_lines after each and every statement</b>. You would like it to do this network rounding after each call. You would like this extra overhead to take place (think of an install script with hundreds/thousands of statements to be executed -- perhaps, just perhaps you don't want this extra call after every call)
    2) SQLPLUS automatically calls the dbms_output API "enable" to turn on the buffering that happens in the package.Regards.
    Al

  • Question about download file in OAS4

    Question about download file in OAS4:
    I use Oracle Application Server 4.0.7 on my Windows NT 4.0 SP6;
    I use PL/Sql Cartridge developer a document system; It's use the
    upload/download in PL/Sql Cartridge;
    I read the document , the Upload/download in Pl/Sql Base on the
    Oracle Application Server's Content Service. the Problem is when I
    download a document, If I upload a Html or MsWord file, It will store in a LongRaw column, when me download ; It's tell me can't
    find a application to open this file; I will select a application
    from list to open the download file;
    As normal, It will open MsWord Automatic when download a "doc" file ; also It will open a new window of Browser to view a Html file;
    I check the download process on client Browser; when download
    file, The content-type always return "application/octet-stream";
    Also the download File will lost the postfix of the file,
    So Browser don't open the File Automatic;
    I think If I set the correct Content-Type , Browser can know how open the file; So I use owa_content.set_content_type procedure
    set the Doc file to "application/msword" , but the WEb Server always
    return "application/octet-stream";
    I didn't know how to do this problem, Plese help me.
    null

    I have a Tecra M2 and rely on your email update to ensure I have the latest drivers on my machine.
    When I received a Toshiba support email on 14 April 2005 giving reference to a QFE from Microsoft I assumed it would be necessary for my Tecra.
    I was very confused when I found that this QFE and subsequent ones posted on the 16 April 2005 relate to Pre SP2 critical updates no9t required if one has already taken earlier advice of updating to Service Pack, at the very least your narrative should make mention of this. I find it very difficult to believe that your updates are two+ years out of date.

  • Basic questions about Infocube

    Hi, everyone.
    I got very basic questions about infocube data handling.
    With infopackage, I extracted all the data about employees from R/3.
    But there were some mistakes during inputting employee data, like positions,
    so I just extracted those employees data once more.
    Now I have two requests in infocube, where the first one has some wrong data.
    Is there any solutions about this?
    I might got it all wrong, so as beginner, any suggestions and explanations will
    be grateful.

    Hi,
    You can manually delete the earlier request by going in the Manage option of the cube. select the request and click on delete icon at the bottom.
    Other option is to make setting in the Infopackage to delete similar or overlapping request.
    Data target tab --> 6th column Automatic loading / deletion of similar request. --> click on the blank icon --> you will get a pop-up --> select the radio button - "delete existing request" --> Select Conditions --> Infosource are same, datasource are same and source system are same, --> selections are "Same or  More Comprehensive "
    Assign points if useful
    Regards
    Venkata Devaraj !!!

  • A question about compatiblilty of JDBC

    Hi, there,
    I have a question about JDBC 3.0 in JDK1.4.1.
    We build a .jar using JDK1.4.1 and this .jar file
    provides JDBC 3.0 interface.
    I then tried to call the interface under JDK1.3.1
    but it keeps asking me about the getParameterMetaData()
    in PreparedStatement.
    (The error message like this:
    Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/ParameterMetaData dbmaker.sql.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:257)
    I did implement the getParameterMetaData() method,
    but I didn't call this method in my testing program.
    It's quite strange since when JDK1.2 was release,
    we implemented the getBlob() method in
    ResultSet class and there's no problem when we
    use JDK1.1 run time to call this ResultSet object.
    Could any one tell me why? Is this caused by a
    compatibility problem between JDK1.4 and the
    older versions of JDK?

    Hi, there,
    Let me outline the condition by examples so that maybe you can help me. PLEASE! Could somebody tell us what's wrong?
    - CASE 1:
    In JDK1.2, we implemented a new method getBlob which returns the type of Blob (this is done according to JDBC 2.0 specification.) in ResultSet class. We can use the .jar compiled by jdk1.2 in jdk1.1 environment.
    e.g. We make a xyz.jar by jdk1.2 and the xyz.jar includes new method getBlob in ReaultSet class. Then, one java application including ResultSet class CAN run under jdk1.1 with xyz.jar, if the method ResultSet.getBlob() is not called.
    - CASE 2:
    BUT, the following case which is the same as in the above condition will fail in jdk1.3 environment.
    In JDK 1.4, we implemented a new method getParameterMetaData() which returns the type of ParameterMetaData. (BTW, this is done according to JDBC 3.0 specification.) in PreparedStatement class. We CANNOT use the .jar compiled by jdk1.4 in jdk1.3 environment.
    e.g. We make a ttt.jar by jdk1.4 and ttt.jar includes the new method getParameterMetaData() in PreparedStatement class. Then, one java application including PreparedStatement class CANNOT be run under jdk1.3 with ttt.jar, even when the method PreparedStatement.getParameterMetaData() is not called.

  • Some questions about importing HTML files

    Hi, folks
    Let's suppose we want to import a pack of HTML files formatted in HTML5 wit's it's CSS into a double-oriented folio. A couple or three questions about that, please:
    1. Is there a limit for a reasonable quantity of HTML files I can import into a folio? I mean.. 100 would be way too much, for instance?
    2. These HTML files could be navigated and referenced from inside TOC-pages made in InDesign,right? (navto://..., I gues?)
    2. Will it be possible, by means of HTML adaptative design techniques, to treat both orientations (vertical and horizontal) as different viewports or screen sizes so that the design adapts for instance the column width with its CSS?
    3. That said, will the InDesign final app. respect that adaptative CSS rules?
    I am asking this because we are looking for a way to inject big quantities of content with a very similar design into our application in a really fast and automatizable way and I have the suspicion* that importing HTML5 preformated CSS files could be the a very good and simple alternative to importing XML into InDesign templates as we start out content as tagged almost-html files.
    Thanks a lot
    Gustavo Sánchez (Posting from Madrid)

    I assume you are asking about using HTML articles.
    1. There is no limit beyond simply keeping things reasonable.
    2. Yes. Just use navto://articlename
    3. Yes. I've used min-width of 768 and max width of 1024 to control it.
    4. InDesign does not enter into any of this with the exception of using the folio builder panel. Everything else is done in Dreamweaver or whatever program you decide to use for the article.
    If you want to restrict the HTML articles to one orientation or the other, use the _h and _v suffixes.
    Bob

Maybe you are looking for