Problem with jdbc:odbc returning incorrect number of rows.

Hello,
Am sure i have done something stupid, but i have an issue with jdbc:odbc ....
It is a simple sceanrio that i have coded umpteen times before ...
I have the following ....
1. Connection to DB2 on an IBM i5 (I apologise for not using native drivers from jt400.jar, but i had an ODBC code example and was in a rush - no excuse i know)
2. Statement object created from connection above
3. A string with my SQL in it
4. A result set for the results.
These are created as follows:
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection(ODBCSource, userID, password);
if (con == null) {
// error handling not relevant here
} else {
Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
String SQL = "select * from table";
ResultSet rs = s.executeQuery(SQL);
i then try to loop ....
while (rs.next() )
// stuff
however, i only ever get one result .... if i stick in the check for isLast, the first loop hits this check, i get my little status message, and the loop ends.
while (rs.next() )
if (rs.isLast() )
System.out.println("I am on last record");
BUT if i run the SQL
"select count(*) from table" ... i get a count of 148 !!
I tried setting the FetchSize through setFetchSize(), but made no difference.
This is running on a JBoss server 4.2.1GA, JDK is "jdk1.6.0_02" .... i have a suspicion that this may be a JBoss specfic issue, as this exact code runs just fine on the Domino platform that it was originally on, if this is the case, i apologise for wasting everyones time .... but would still appreciate any pointers you can give me.
Cheers

Hello,
Thanks for the reply, I am not sure i follow what you are saying.
I only mentioned JBoss as it is the application server that we have deployed to and because the orignal code ran fine on a Domino server, I will take your advice and try to run it through in debug rather than running actually on the application server.
Am i incorrect in my assumption that if "select count(*) from table" gives a count of 148, i should expect 148 records in a result set created from "select * from table" ? This is all rather new to me so i apologise if this is incorrect, I'd love to know why this is incorrect so i dont make similar mistakes in future.
Also, If i run this same code on the previous platform, i get 148 iterations of the code contained within
while (rs.next() ) { ... }
When the war file is deployed to JBoss, the same SQL statement gives a result set that only iterates once for
while (rs.next() ) { ... }
The previous platform as I say was domino, but it was running as a lotus notes java agent (despite not using any notes documents etc) as it happened to be where the web pages that call this process were located. It is possible that some of the main code has changed as I had cut and paste the code into a servlet using MyEclipse, but i have double checked the bit that does this SQL request and it is identical
To complete the picture, the new servelt is then called from the action tag on the submit form on a JSP, when it ends the servlet redirects via the requestdispacher to success or failure jsp pages depending on the outcome of the processing.
Thank you again for your help.

Similar Messages

  • Ms Access problems with Jdbc Odbc!!!

    Hi again people,
    Im creating a GUI swing project connecting a database (MsAccess) to a dialog using the bridge driver,
    The GUI is coming up but im getting runtime errors and the data does not go to the fields, the dialog and connection are in two files:
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*; //SQL package for the statements
    import javax.swing.*;
    class DatabaseMan
         public ResultSet m_resultSet; //recordset resulting from SQL query
         public ResultSetMetaData m_rsmd; //used to get general info about the columns
         private int m_nNumberOfFields; //number of fields in a recordset
         private Connection conn;
         private Statement stmt;
         public DatabaseMan(String strSQLQuery)
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");          
                   try               //establish connection to the database
                        //try to get connection to the database
                        conn = DriverManager.getConnection("jdbc:odbc:db1");
                        //this is not where we update the database so we make it read only
                        stmt = conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
                                                                     ResultSet.CONCUR_READ_ONLY);                                   
                        m_resultSet = stmt.executeQuery(strSQLQuery);
                   catch(SQLException exSQL)
                        System.err.println("\n\n\t\t ***SQLException has" +
                                                 "been caught ***\n\n");
                   while ( exSQL != null)
                        System.err.println("\nSQLState : " + exSQL.getSQLState() );
                   System.err.println("\nMessage : " + exSQL.getMessage() );
                             System.err.println("\nVendor code : "+ exSQL.getErrorCode() );
                             System.err.println("\n");
                             exSQL = exSQL.getNextException();
              catch( ClassNotFoundException e)
                   System.err.print("\n\n\tClassNotFoundException has"
                                       +" been caught");
                   System.err.println( e.getMessage());
              catch( java.lang.Exception ex )
                   ex.printStackTrace();
         public void CloseConnection() //close connection to database
              try
                        conn.close();
                        stmt.close();
                        m_resultSet.close(); //release the resources
                   catch (SQLException exSQL )
                        System.out.println("SQL Exception: " + exSQL.getMessage());
                        exSQL.printStackTrace(System.out);
         public int getNoFields()
              return m_nNumberOfFields;
    } //end of DatabaseMan.java
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import DatabaseMan;
    import javax.swing.*;
    class DBviewer extends JDialog implements ActionListener
         //JButtons to create toolbar
         private JButton m_buttonFirst;
         private JButton m_buttonNext;
         private JButton m_buttonPrevious;
         private JButton m_buttonLast;
         private JButton m_buttonClose;
         private JButton m_mainbuttonClose;
         //textfields to transfer the data from database
         private JTextField m_name;
         private JTextField m_age;
         private JTextField m_weight;
         private JTextField m_professionalism;
         private JTextField m_speed;
         private JTextField m_acceleration;
         private JTextField m_jump;
         private JTextField m_stamina;
         private JTextField m_bravery;
         private JTextField m_fitness;
         private JTextField m_experience;
         //labels to identify the textfields
         private JLabel m_labelname;
         private JLabel m_labelage;
         private JLabel m_labelweight;
         private JLabel m_labelspeed;
         private JLabel m_labelacceleration;
         private JLabel m_labelprofessionalism;
         private JLabel m_labeljump;
         private JLabel m_labelstamina;
         private JLabel m_labelbravery;
         private JLabel m_labelfitness;
         private JLabel m_labelexperience;
         DatabaseMan m_DatabaseMan;
         private String strSQLQuery1;
         private String type1 = new String("");
         public DBviewer(Frame parent, String caption, boolean bModal, String type)
              super(parent,caption,true);
              setSize(600,400);
              setLocation( new Point(150 , 150 )); //position it pops up on screen.
              setResizable(false);
              strSQLQuery1 = new String("");
              type1 = type;
              //SQL query to show the horse database
              if(type =="Horse")
                   strSQLQuery1 ="SELECT *" +
                                  "FROM HORSE";
                   buildHorseGUI();
              if(type =="Jockey")
                   strSQLQuery1 ="SELECT *" +
                                  "FROM JOCKEY"+
                                  " ORDER BY NAME";
                   buildJockeyGUI();                         
              if(type =="Course")
                   strSQLQuery1 ="SELECT *" +
                   "FROM RACECOURSE"+
                                  " ORDER BY NAME";
                   buildCourseGUI();
              m_DatabaseMan = new DatabaseMan(strSQLQuery1);
              /*try
              {//reset values with default move up to top later
                   if(m_DatabaseMan.m_resultSet.first())
                        transferData(type1);
              catch( SQLException exSQL)
                   System.out.println("SQL Exception: " + exSQL.getMessage());
                   exSQL.printStackTrace(System.out);
         public void buildHorseGUI() //construct the horse GUI
              buildDefaultGUI(); //build default buttons and toolbar
              m_labelname = new JLabel(" Horse Name:",JLabel.CENTER);
              m_labelname.setBackground(Color.blue);
              m_labelname.setForeground(Color.white);
              m_labelage = new JLabel("Age: ",JLabel.CENTER);
              m_labelage.setBackground(Color.blue);
              m_labelage.setForeground(Color.white);     
              m_labelweight = new JLabel("Weight(p): ",JLabel.CENTER);
              m_labelweight.setBackground(Color.blue);
              m_labelweight.setForeground(Color.white);
              m_labelspeed = new JLabel("Speed:",JLabel.CENTER);
              m_labelspeed.setBackground(Color.blue);
              m_labelspeed.setForeground(Color.white);
              m_labelacceleration = new JLabel("Acceleration:",JLabel.CENTER);
              m_labelacceleration.setBackground(Color.blue);
              m_labelacceleration.setForeground(Color.white);
              m_labelprofessionalism = new JLabel("Professionalism:",JLabel.CENTER);
              m_labelprofessionalism.setBackground(Color.blue);
              m_labelprofessionalism.setForeground(Color.white);
              m_labeljump = new JLabel("Jump:",JLabel.CENTER);
              m_labeljump.setBackground(Color.blue);
              m_labeljump.setForeground(Color.white);
              m_labelstamina = new JLabel("Stamina:",JLabel.CENTER);
              m_labelstamina.setBackground(Color.blue);
              m_labelstamina.setForeground(Color.white);     
              m_labelbravery = new JLabel("Bravery:",JLabel.CENTER);
              m_labelbravery.setBackground(Color.blue);
              m_labelbravery.setForeground(Color.white);
              m_labelfitness = new JLabel("Fitness:",JLabel.CENTER);
              m_labelfitness.setBackground(Color.blue);
              m_labelfitness.setForeground(Color.white);     
              m_labelexperience = new JLabel("Experience",JLabel.CENTER);
              m_labelexperience.setBackground(Color.blue);
              m_labelexperience.setForeground(Color.white);          
              //creation of textfields to hold the data
              //making them non-editable and b/ground of black with white text
              m_name = new JTextField(20);
              m_name.setEditable(false);
              m_name.setBackground(Color.black);
              m_name.setForeground(Color.white);
              m_age = new JTextField(2);
              m_age.setEditable(false);
              m_age.setBackground(Color.black);
              m_age.setForeground(Color.white);
              m_weight = new JTextField(3);
              m_weight.setEditable(false);
              m_weight.setBackground(Color.black);
              m_weight.setForeground(Color.white);
              m_speed = new JTextField(2);
              m_speed.setEditable(false);
              m_speed.setBackground(Color.black);
              m_speed.setForeground(Color.white);
              m_acceleration = new JTextField(2);
              m_acceleration.setEditable(false);
              m_acceleration.setBackground(Color.black);
              m_acceleration.setForeground(Color.white);
              m_professionalism = new JTextField(2);
              m_professionalism.setEditable(false);
              m_professionalism.setBackground(Color.black);
              m_professionalism.setForeground(Color.white);
              m_jump = new JTextField(2);
              m_jump.setEditable(false);
              m_jump.setBackground(Color.black);
              m_jump.setForeground(Color.white);
              m_stamina = new JTextField(2);
              m_stamina.setEditable(false);
              m_stamina.setBackground(Color.black);
              m_stamina.setForeground(Color.white);
              m_bravery = new JTextField(2);
              m_bravery.setEditable(false);
              m_bravery.setBackground(Color.black);
              m_bravery.setForeground(Color.white);
              m_fitness = new JTextField(2);
              m_fitness.setEditable(false);
              m_fitness.setBackground(Color.black);
              m_fitness.setForeground(Color.white);
              m_experience = new JTextField(2);
              m_experience.setEditable(false);
              m_experience.setBackground(Color.black);
              m_experience.setForeground(Color.white);
              //create a panel to hold this data
              Panel data = new Panel();
              data.setLayout(new GridLayout(0,4));
              data.setBackground(Color.blue);
              data.add(m_labelname);
              data.add(m_name);
              data.add(m_labelage);
              data.add(m_age);
              data.add(m_labelweight);
              data.add(m_weight);
              data.add(m_labelspeed);
              data.add(m_speed);
              data.add(m_labelacceleration);
              data.add(m_acceleration);
              data.add(m_labelprofessionalism);
              data.add(m_professionalism);
              data.add(m_labeljump);
              data.add(m_jump);
              data.add(m_labelstamina);
              data.add(m_stamina);
              data.add(m_labelbravery);
              data.add(m_bravery);
              data.add(m_labelfitness);
              data.add(m_fitness);
              data.add(m_labelexperience);
              data.add(m_experience);
              getContentPane().add(data, BorderLayout.CENTER);
         public void buildDefaultGUI() //construct the default components for GUI
              JToolBar wndToolBar = new JToolBar();
              wndToolBar.setBackground(Color.green);
              wndToolBar.setFloatable(false);
              m_buttonFirst = new JButton( new ImageIcon( "graphic/myFirst.gif" ) );
              m_buttonPrevious = new JButton(new ImageIcon( "graphic/myPrevious.gif" ) );
              m_buttonNext = new JButton(new ImageIcon( "graphic/myNext.gif" ) );
              m_buttonLast = new JButton(new ImageIcon( "graphic/myLast.gif" ) );
              m_buttonClose = new JButton(new ImageIcon( "graphic/myClose.gif" ) );
              m_mainbuttonClose = new JButton("CLOSE");
              // implement action listener
              m_buttonFirst.addActionListener(this);
              m_buttonPrevious.addActionListener(this);
              m_buttonNext.addActionListener(this);
              m_buttonLast.addActionListener(this);
              m_buttonClose.addActionListener(this);
              m_mainbuttonClose.addActionListener(this);
              //set the tool tips for each of the button
              m_buttonFirst.setToolTipText( "Display first record" );
              m_buttonPrevious.setToolTipText( "Display previous record" );
              m_buttonNext.setToolTipText( "Display next record" );
              m_buttonLast.setToolTipText( "Display last record" );
              m_buttonClose.setToolTipText( "Close this window and return to game" );
              m_mainbuttonClose.setToolTipText( "Close this window and return to game" );
              m_mainbuttonClose.setBackground(Color.green);
              //add these buttons to the toolbar
              wndToolBar.add( m_buttonFirst );
              wndToolBar.add( m_buttonPrevious );
              wndToolBar.add( m_buttonNext );
              wndToolBar.add( m_buttonLast );
              wndToolBar.addSeparator(); //separator in the toolbar
              wndToolBar.add( m_buttonClose );
              getContentPane().add(wndToolBar, BorderLayout.NORTH);
              getContentPane().add(m_mainbuttonClose, BorderLayout.SOUTH);
         public void buildCourseGUI() //construct the course GUI
              buildDefaultGUI();
         public void buildJockeyGUI() //construct the jockey GUI
              buildDefaultGUI();
         public void actionPerformed( ActionEvent evt)
              //button first record is pressed
              if( evt.getSource() == m_buttonFirst )
                   try
                        if( m_DatabaseMan.m_resultSet.first() )
                             transferData(type1);
                   catch (SQLException exSQL )
                        System.err.println( exSQL.toString() );
              //button next record is pressed
              if( evt.getSource() == m_buttonNext )
                   try
                        if(!m_DatabaseMan.m_resultSet.isLast())
                             if(m_DatabaseMan.m_resultSet.next())
                                  transferData(type1);
                   catch (SQLException exSQL )
                        System.err.println( exSQL.toString() );
              //previous button is pressed
              if( evt.getSource() == m_buttonPrevious )
                   try
                        if( !m_DatabaseMan.m_resultSet.first())
                             if(m_DatabaseMan.m_resultSet.previous())
                                  transferData(type1);
                   catch (SQLException exSQL )
                        System.err.println( exSQL.toString() );
              //last button is pressed
              if( evt.getSource() == m_buttonLast )
                   try
                        if(m_DatabaseMan.m_resultSet.last())
                             transferData(type1);
                   catch (SQLException exSQL )
                        System.err.println( exSQL.toString() );
              // close button(s) pressed
              if( evt.getSource() == m_buttonClose)
                   setVisible( false );
                   dispose(); //return the dialog window resources
                   m_DatabaseMan.CloseConnection();
              if( evt.getSource() == m_mainbuttonClose)
                   setVisible( false );
                   dispose(); //return the dialog window resources
                   m_DatabaseMan.CloseConnection();
         public void transferData(String type1) throws SQLException //return a String
              if(type1 =="Horse")
                   //transfer horse details
                   m_name.setText(m_DatabaseMan.m_resultSet.getString("NAME"));
                   m_professionalism.setText(m_DatabaseMan.m_resultSet.getString("PROFESSIONALISM"));
                   m_speed.setText(m_DatabaseMan.m_resultSet.getString("SPEED"));
                   m_stamina.setText(m_DatabaseMan.m_resultSet.getString("STAMINA"));
                   m_weight.setText(m_DatabaseMan.m_resultSet.getString("WEIGHT"));
                   m_experience.setText(m_DatabaseMan.m_resultSet.getString("EXPERIENCE"));
                   m_fitness.setText(m_DatabaseMan.m_resultSet.getString("FITNESS"));
                   m_jump.setText(m_DatabaseMan.m_resultSet.getString("JUMP"));
                   m_age.setText(m_DatabaseMan.m_resultSet.getString("AGE"));
                   m_bravery.setText(m_DatabaseMan.m_resultSet.getString("BRAVERY"));
                   m_acceleration.setText(m_DatabaseMan.m_resultSet.getString("ACCELERATION"));
              if(type1 =="Jockey")
                   m_name.setText(m_DatabaseMan.m_resultSet.getString("NAME"));
                   m_age.setText(m_DatabaseMan.m_resultSet.getString("AGE"));
              if(type1 =="Course")
                   //transfer course details not implemented yet
    } //end of class DBviewer
    I ve set up an odbc driver and the database has data in it but I still get this run time error an no data is transfered to the dialog box
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1525)
    at sun.jdbc.odbc.JdbcOdbcResultSet.reWordAsCountQuery(JdbcOdbcResultSet.java:6268)
    at sun.jdbc.odbc.JdbcOdbcResultSet.calculateRowCount(JdbcOdbcResultSet.java:6061)
    at sun.jdbc.odbc.JdbcOdbcResultSet.initialize(JdbcOdbcResultSet.java:150)
    at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:420)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:250)
    at DatabaseMan.<init>(DatabaseMan.java:34)
    at DBviewer.<init>(DBviewer.java:83)
    at MainWindow.actionPerformed(MainWindow.java:266)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
    at java.awt.Component.processMouseEvent(Component.java:3715)
    at java.awt.Component.processEvent(Component.java:3544)
    at java.awt.Container.processEvent(Container.java:1164)
    at java.awt.Component.dispatchEventImpl(Component.java:2593)
    at java.awt.Container.dispatchEventImpl(Container.java:1213)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
    at java.awt.Container.dispatchEventImpl(Container.java:1200)
    at java.awt.Window.dispatchEventImpl(Window.java:914)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    Im really stuck!!! any suggestions? thanks in advance

    Thank you for your response and sorry for the length
    of code,
    Thats was my first idea that it was asking for
    or something I dont have but I checked my database and
    I dont have any unusually large data entries (most
    between 8-15 letters, the others are numbers) could it
    be something wrong with how I've entered the database
    in MsAccess, or am i barking up the wrong tree again!
    Many thanks
    RobI think you've misunderstood me. This has nothing to do with unusually large data entries, but rather the opposite. You are wrongly expecting data that is shorter than you think. When you call rs.getString(i) to retrieve a column value of a field, and you only want the first 5 characters in the column (instead of 10 or whatever the column size is), you would do something similar to the following:
    String column_value = rs.getString(1).subtstring(0,5);The above expects a String that is at least 5 characters. Your problem is when your column value returned is less than the specified substring index ( in this case 5 ) it will throw an exception. If you changed your code to this, the error will not occur:
    String column_value = rs.getString( 1 ).subtstring( 0, 5);
    if ( column_value.length() > 5 )
    column_value = column_value.substring( 0, 5 );
    }Jamie

  • Problems with JDBC-ODBC Driver

    Hello,
    I am trying to access a DSN on my windows with a dedicated DB driver of some company. so i used the JDBC-ODBC connector.
    when launching the java code, and debugging the problem i get the following error:
    DriverManager.getConnection("jdbc:odbc:priority32;UID=Manager;PWD=keren")
        trying driver--className=com.mysql.jdbc.Driver,com.mysql.jdbc.Driver@16caf43--
        trying driver--className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@66848c--
    *Driver.connect (jdbc:odbc:priority32;UID=Manager;PWD=keren)
    JDBC to ODBC Bridge: Checking security
    No SecurityManager present, assuming trusted application/applet
    JDBC to ODBC Bridge 2.0001
    Current Date/Time: Tue Aug 12 07:50:37 VET 2008
    Loading JdbcOdbc library
    Allocating Environment handle (SQLAllocEnv)
    hEnv=50338088
    Allocating Connection handle (SQLAllocConnect)
    hDbc=50338256
    Connecting (SQLDriverConnect), hDbc=50338256, szConnStrIn=DSN=priority32;UID=Manager;PWD=keren
    *Connection.getMetaData
    *DatabaseMetaData.getDriverName
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=6, len=300
    tabula.dll
    *DatabaseMetaData.getDriverVersion
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=7, len=300
    07.00.0000
    *DatabaseMetaData.getDriverName
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=6, len=300
    tabula.dll
    Driver name:    JDBC-ODBC Bridge (tabula.dll)
    *DatabaseMetaData.getDriverVersion
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=7, len=300
    07.00.0000
    Driver version: 2.0001 (07.00.0000)
    Caching SQL type information
    *Connection.getMetaData
    *DatabaseMetaData.getTypeInfo
    Allocating Statement Handle (SQLAllocStmt), hDbc=50338256
    hStmt=50339424
    Get type info (SQLGetTypeInfo), hStmt=50339424, fSqlType=0
    Number of result columns (SQLNumResultCols), hStmt=50339424
    value=15
    Get connection info string (SQLGetInfo), hDbc=50338256, fInfoType=10, len=300
    03.52.0000
    Fetching (SQLFetch), hStmt=50339424
    Column attributes (SQLColAttributes), hStmt=50339424, icol=1, type=2
    value (int)=12
    Column attributes (SQLColAttributes), hStmt=50339424, icol=1, type=3
    value (int)=129
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    CHAR
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=12
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    CHAR(1)
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=1
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    RCHAR
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=12
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    REAL
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=6
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    INT
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    UNSIGNED
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    TIME
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=10
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DATE
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=11
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DATE
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=9
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DAY
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=4
    Fetching (SQLFetch), hStmt=50339424
    Get string data (SQLGetData), hStmt=50339424, column=1, maxLen=130
    DECIMAL
    Get integer data (SQLGetData), hStmt=50339424, column=2
    value=3
    Get integer data (SQLGetData), hStmt=50339424, column=3
    value=0
    Fetching (SQLFetch), hStmt=50339424
    End of result set (SQL_NO_DATA)
    *ResultSet.close
    Free statement (SQLFreeStmt), hStmt=50339424, fOption=1
    *ResultSet has been closed
    Get connection info (SQLGetInfo), hDbc=50338256, fInfoType=44
    int value=0
    Get connection info (SQLGetInfo), hDbc=50338256, fInfoType=121
    RETCODE = -1
    ERROR - Generating SQLException...
    SQLState(S1096) vendor code(0)
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Information type out of range
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.SQLGetInfo(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcConnection.checkBatchUpdateSupport(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at WigsUpdate.main(WigsUpdate.java:25)
    getConnection returning driver--className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@66848c--what can be done?
    thank you very much

    HimberJack wrote:
    oh now i understand.
    i got a very unknown company which supplied the ODBC driver, but they dont have java driver...
    so I have nothing to do about it?The choices are find a different driver or use the one you have.
    The one you have doesn't do batches.
    Finding a different driver could involve the following.
    - Buying one from somewhere else
    - Pay someone to write one.
    - Write a driver yourself.
    All of those are somewhat dependent that the "unknown company" has an API that supports that. You (or someone) could also figure out the file format of the "unknown company" as well and then write one.

  • Newbie: Problem with jdbc-odbc and MS SQL server 2005

    I'm on win vistax64 with SQLSERVER 2005 and I have set up the odbc source as system dsn using the SQL Native Client driver with SQL authentication and the connectivity test in the end succeeds.
    I'm trying to make a simple web app that will connect to the database and perform simple querries. It's a school assignment.
    I'm using the jdbc-odbc bridge because it's the simplest way to do it and it's what we were shown in class.
    I get the following irritating error:
    "Cannot establish a connection to jdbc:odb:sstmdb using sun.jdbc.odbc.JdbcOdbcDriver ([Microsoft][ODBC Driver Manager] Data source name not found and no default driver specifies)".
    I'm working with netbeans 5.5.1 and this error is what I get when in the runtime tab I try to connect with the jdbc-odbc. I get a similar error in the logs when I try to run the app on the j2ee server.
    This is the java class that establishes the connection.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class Connector {
        private static final String dbUrl="jdbc:odbc:sstmdb";
        private static final String user="kimon";
        private static final String password="jackohara";
        public static Connection getConnection(){
            Connection conn = null;
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                conn = DriverManager.getConnection(dbUrl,user,password);
            } catch (SQLException e) {
                e.printStackTrace(); 
            } catch (ClassNotFoundException e) {
                e.printStackTrace(); 
            return conn;
    }It has worked perfectly on my school PC with winXP and MSDE2000.
    What am I missing?

    Ok, help came from an other way where I was inquiring about a different problem:
    Connectivity works fine by using User DSN instead of System DSN for the ODBC source.

  • Problem With Jdbc-Odbc BRidge Connection

    I get The following error
    SQLException:[Microsoft][ODBC Driver Manager] Invalid cursor state
    when using the code
    whats the problem with it
    import java.sql.*;
    public class Employee {
    String DBurl;
    Connection con;
    public Employee(String url)
    DBurl=url;
    void queryTest()
    String query="SELECT * FROM EmpTable";
    ResultSet result;
    Statement stmt;
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException e){
    System.err.println("Class not Found Exception:");
    System.err.println(e.getMessage());
    try{
    con=DriverManager.getConnection(DBurl,"myLogin","mypassword");
    stmt=con.createStatement();
    result=stmt.executeQuery(query);
    System.out.println("ID"+"\t"+"Name"+"\t"+"Rate"+"\t"+"DeptID");
    System.out.println("--"+"\t"+"----"+"\t"+"---"+"\t"+"----");
    while(result.next());
    String name=result.getString("Name");
    int ID=result.getInt("ID");
    float rate=result.getFloat("Rate");
    int deptID=result.getInt("DeptID");
    System.out.println(ID+"\t"+name+"\t"+rate+"\t"+deptID);
    stmt.close();
    con.close();
    catch(SQLException ex){
    System.err.println("SQLException:" + ex.getMessage());
    public static void main(String args[])
    Employee app = new Employee("jdbc:odbc:Employee");
    app.queryTest();
    }

    here's your mistake:
    while(result.next());  // <--- the loop body is empty.Remove the semi-colon.
    %

  • Problem with JDBC ODBC connectivity

    I am trying to connect to MS access database with jsp page. This is sample from my js page :
    String SUN_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
    Class.forName(SUN_DRIVER);
    String aDataSourceName = "puneet";
    String url = "jdbc:odbc:" + aDataSourceName;
    Connection con;
    con = DriverManager.getConnection("jdbc:odbc:puneet","","");
    The last line gives me the follwoing error :
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    puneet is name of my datasource and it points to my .mbd file.
    I dont have anyusername or passwords for this daatsource.
    I am using Tomcat/4.1.18-LE and jdk1.4
    I have also added rt.jar in the classpath
    pls help
    pg4

    Hi pg4,
    May be your dsn is not pointing to .mdb file. Check it by putting your mdb file right where your code is and then user following syntax which is called dsn-less connection. It helps you to connect to the target mdb file with out any need of dsn.
    String url = "jdbc:odbc:;Driver={Microsoft Access Driver (*.mdb)}; DBQ=yourDBFile.mdb";
    regards,
    Humayun

  • Problem with JDBC-ODBC bridge

    OS in my PC is Windows7 Ultimate(64-bit), and I had JDK1.7.0_21(compatible with my PC), Oracle 10G ExpressEdition(32-Bit), ApacheTomcat7.0.11(compatible with my PC).
    As my OS is 64-BIT, I accessed C:\Windows\SysWOW64\odbcad32 and  I selected UserDSN tab->Add->Microsoft ODBC for Oracle->finish,tapply->ok. Then a Dialog Box appeared and I entered a DSN name=ramsdsn and my DATABASE USERID=rams in username->ok->apply->ok.
    But when I tried to compile my program using:
          DriverManager.getConnection("jdbc:odbc:ramsdsn","rams","rams");
    I got an error:java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
    Help me FRNZ.. I have been trying it for 7 days and I'm tired of it and I could not figured it yet...
    THANKS in Advance...

    Wrong database is the most likely reason.
    Note that the ODBC driver is not a good driver for MS SQL Server. It handles varchar as chars. So an insert of 'A' into a varchar(25) will end up with 'A' followed by 24 spaces. And that probably isn't what you want your varchars to do.

  • I have a problem with JDBC Realm in Tomcat/Oracle/Win XP

    I have a problem with JDBC Realm in Tomcat.
    I have attached my server.xml file located in the
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml
    The Problem is that when I login I get the user name and password prompt but it does not resolve.
    When I enter in the tomcat-users.xml password with memory realm uncommented it works fine.
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml
    Is there a cache or something I need to reset for the JDBC Realm to work?
    I have attached my tables and contents as well...
    Did I miss something????
    Thanks
    Phil
    server.xml
    <Server port="8005" shutdown="SHUTDOWN">
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    </GlobalNamingResources>
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@localhost:1521:orcl"
    connectionName="testName" connectionPassword="testPass"
    userTable="users"
    userNameCol="user_name"
    userCredCol="user_pass"
    userRoleTable="user_roles"
    roleNameCol="role_name" />
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    </Host>
    </Engine>
    </Service>
    </Server>
    Tables
    create table users
    user_name varchar(15) not null primary key,
    user_pass varchar(15) not null
    create table roles
    role_name varchar(15) not null primary key
    create table user_roles
    user_name varchar(15) not null,
    role_name varchar(15) not null,
    primary key( user_name, role_name )
    select * from users;
    ----------------------+
    | user_name | user_pass |
    ----------------------+
    | tomcat | tomcat |
    | user1 | tomcat |
    | user2 | tomcat |
    | user3 | tomcat |
    ----------------------+
    select * from roles;
    | role_name |
    | tomcat |
    | role1 |
    select * from user_roles;
    -----------------------+
    | role_name | user_name |
    -----------------------+
    | tomcat | user1 |
    | role1 | user2 |
    | tomcat | tomcat |
    | role1 | tomcat |
    -----------------------+

    Jan 2, 2008 11:49:35 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Jan 2, 2008 11:49:35 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 734 ms
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
    Jan 2, 2008 11:49:35 AM org.apache.catalina.realm.JDBCRealm start
    SEVERE: Exception opening database connection
    java.sql.SQLException: oracle.jdbc.driver.OracleDriver
         at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:684)
         at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:758)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jan 2, 2008 11:49:36 AM org.apache.catalina.core.StandardContext resourcesStart

  • 1 year ago i installed Elements 12 on my PC with a serial number.  Today i have installed Elements 12 also on my laptop. But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this progra

    One year ago i installed Elements 12 on my PC with a serial number and it was OK.
    Today i have installed Elements 12 also on my laptop.
    But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this program real disapeare in 7 days?
    Hans

    Hi,
    Since you already have one copy activated the serial number must be logged in your account details - I would first check that the one logged and the one you are attempting to enter are the same.
    You can check your account details by going to www.adobe.com and clicking on Manage Account. You need to sign in with your Adobe Id and then click on View All under Plans & Products. Next click on View your products and after a while it should produce your list.
    If there is a problem with the serial number, only Adobe can help you there (we are just users). Please see the response in this thread
    First of all, I would have to say that getting in touch with you is a nightmare and I am not at all happy that I can't just email or live chat with someone who can help!  I am not a technical person, I just want to be able to use Photoshop Elements and ge
    Brian

  • FMLE encoding stopped: Problem with capture device. Incorrect samples given by the device.

    Hi Support,
    I am trying to use FMLE to encode and stream video from an Axis P1346 IP camera, via Axis' Streaming Assistant software, to a Wowza server.
    Everyting appears to be working perfectly and the encoding and resultant stream quality is excellent. Sometimes after a few hours and sometimes after just a few minutes, the encoding will stop with the following error:
    Tue Mar 26 2013 11:47:18 : Session Stopped
    Tue Mar 26 2013 11:47:18 : Problem with capture device. Incorrect samples given by the device. Stopping encoding session.
    I have attached a recent log of a session that only lasted a few minutes - do you have any ideas on how to resolve this instability?
    =================================================================
    File: C:\Program Files (x86)\Adobe\Flash Media Live Encoder 3.2\FlashMediaLiveEncoder.exe
    Description: Adobe® Flash® Media Live Encoder
    Copyright: © 2009 - 10 Adobe Systems Incorporated. All Rights Reserved. Adobe, the Adobe logo, and Flash are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. All other trademarks are the property of their respective owners. <AdobeIP#0000716>
    Version: 3.2.0.9932
    =================================================================
    Tue Mar 26 2013 11:42:10 : Selected video input device: TowerBridge
    Tue Mar 26 2013 11:42:10 : Failed with error 80040154:CoCreateInstance(CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC, IID_IBaseFilter, pFilterVideoMixingRenderer.ppv())
    Tue Mar 26 2013 11:42:10 : Display Color Quality Warning : Display color quality is currently lower than 32 bit. Colors in video display may be distorted when encoding is not on. To change the display color, open the Display Properties, Settings tab and change color quality to 32 bit.
    Tue Mar 26 2013 11:42:12 : No audio capture devices detected. : Flash Media Live Encoder requires an audio capture device to be connected and properly installed.
    Tue Mar 26 2013 11:42:24 : Primary - Connected to FMS/3,5,7,7009
    Tue Mar 26 2013 11:42:24 : Primary - Network Command: onFCPublish
    Tue Mar 26 2013 11:42:24 : Primary - Stream[fmlestream] Status: Success
    Tue Mar 26 2013 11:42:24 : Primary - Stream[fmlestream] Status: NetStream.Publish.Start
    ==========================================================
    <?xml version="1.0" encoding="UTF-16"?>
    <flashmedialiveencoder_profile>
        <preset>
            <name>Custom</name>
            <description></description>
        </preset>
        <capture>
            <video>
            <device>TowerBridge</device>
            <crossbar_input>0</crossbar_input>
            <frame_rate>30.00</frame_rate>
            <size>
                <width>640</width>
                <height>360</height>
            </size>
            </video>
            <timecode>
            <frame_rate>15</frame_rate>
            <systemtimecode>true</systemtimecode>
            <devicetimecode>
                <enable>false</enable>
                <vertical_line_no>16</vertical_line_no>
                <burn>false</burn>
                <row>Bottom</row>
                <column>Left</column>
            </devicetimecode>
            </timecode>
        </capture>
        <encode>
            <video>
            <format>H.264</format>
            <datarate>1000;</datarate>
            <outputsize>640x360;</outputsize>
            <advanced>
                <profile>Baseline</profile>
                <level>3.1</level>
                <keyframe_frequency>1 Second</keyframe_frequency>
            </advanced>
            <autoadjust>
                <enable>false</enable>
                <maxbuffersize>1</maxbuffersize>
                <dropframes>
                <enable>false</enable>
                </dropframes>
                <degradequality>
                <enable>false</enable>
                <minvideobitrate></minvideobitrate>
                <preservepfq>false</preservepfq>
                </degradequality>
            </autoadjust>
            </video>
        </encode>
        <restartinterval>
            <days></days>
            <hours></hours>
            <minutes></minutes>
        </restartinterval>
        <reconnectinterval>
            <attempts></attempts>
            <interval></interval>
        </reconnectinterval>
        <output>
            <rtmp>
            <url>rtmp://localhost/live</url>
            <backup_url></backup_url>
            <stream>fmlestream</stream>
            </rtmp>
        </output>
        <metadata>
            <entry>
            <key>author</key>
            <value>Octopus MT</value>
            </entry>
            <entry>
            <key>copyright</key>
            <value>Octopus MT</value>
            </entry>
            <entry>
            <key>description</key>
            <value>Tower Bridge - London, UK</value>
            </entry>
            <entry>
            <key>keywords</key>
            <value>"Tower Bridge", London</value>
            </entry>
            <entry>
            <key>rating</key>
            <value></value>
            </entry>
            <entry>
            <key>title</key>
            <value>Tower Bridge - LIVE</value>
            </entry>
        </metadata>
        <preview>
            <video>
            <input>
                <zoom>100%</zoom>
            </input>
            <output>
                <zoom>100%</zoom>
            </output>
            </video>
            <audio></audio>
        </preview>
        <log>
            <level>100</level>
            <directory>C:\Users\Administrator\Videos</directory>
        </log>
    </flashmedialiveencoder_profile>
    ==========================================================
    DumpGraph [00CA91F8]
        Filter [00CABFDC] Output Video Renderer
              Pin [00CAC3B4] Input [Input] Connected to pin [00CACE1C]
        Filter [00CA9C8C] Input Video Renderer
              Pin [00CAA064] Input [Input] Connected to pin [03BA33A4]
        Filter [02F6AF10] Mux
              Pin [02F6AF70] FLV7 [Input] Connected to pin [02F6FC00]
              Pin [02F6B790]  audio [ Input] This pin is not Connected
              Pin [02F6BA08]  out [ Output] This pin is not Connected
        Filter [00CAEADC] AVI Decompressor 0003
              Pin [00CAEC14] XForm In [Input] Connected to pin [02F70D88]
              Pin [00CACE1C] XForm Out [Output] Connected to pin [00CAC3B4]
        Filter [03BA326C] AVI Decompressor
              Pin [00CAACD4] XForm In [Input] Connected to pin [02F68BF8]
              Pin [03BA33A4] XForm Out [Output] Connected to pin [00CAA064]
        Filter [02F70048] H264 Compressor
              Pin [02F70070] Input [Input] Connected to pin [02F6F898]
              Pin [02F70D88] Preview [Output] Connected to pin [00CAEC14]
              Pin [02F6FC00] Output1 [Output] Connected to pin [02F6AF70]
              Pin [02F71228]  Output2 [ Output] This pin is not Connected
        Filter [02F68AF0] Input RGB
              Pin [02F68B08] Input [Input] Connected to pin [02F60178]
              Pin [02F68BF8] Output [Output] Connected to pin [00CAACD4]
        Filter [02F6F118] FPS Controller Encoder
              Pin [02F6F128] Input [Input] Connected to pin [02F6E880]
              Pin [02F6F898] Output [Output] Connected to pin [02F70070]
        Filter [02F5FAB8] YV12
              Pin [02F5FAD0] Input [Input] Connected to pin [03BA3F24]
              Pin [02F60178] Output [Output] Connected to pin [02F68B08]
        Filter [02F6E778] Resize
              Pin [02F6E790] Input [Input] Connected to pin [02F6E620]
              Pin [02F6E880] Output [Output] Connected to pin [02F6F128]
        Filter [02F6DF60] YV12 0002
              Pin [02F6DF78] Input [Input] Connected to pin [02F6DE00]
              Pin [02F6E620] Output [Output] Connected to pin [02F6E790]
        Filter [02F6D680] FPS Controller Resize
              Pin [02F6D690] Input [Input] Connected to pin [00CA9B6C]
              Pin [02F6DE00] Output [Output] Connected to pin [02F6DF78]
        Filter [00CAB9CC] Video Tee
              Pin [00CABA34] Input [Input] Connected to pin [03B9EE9C]
              Pin [03BA3F24] Output1 [Output] Connected to pin [02F5FAD0]
              Pin [00CA9B6C] Output2 [Output] Connected to pin [02F6D690]
              Pin [03BA3454]  Output3 [ Output] This pin is not Connected
        Filter [00CA99C4] Smart Tee
              Pin [00CA9A2C] Input [Input] Connected to pin [00C0974C]
              Pin [03B9EE9C] Capture [Output] Connected to pin [00CABA34]
              Pin [00CAE204]  Preview [ Output] This pin is not Connected
        Filter [00C0A6DC] SOURCE
              Pin [00C0974C] Video [Output] Connected to pin [00CA9A2C]
    DumpGraph [00CA91F8]
        Filter [00CABFDC] Output Video Renderer
              Pin [00CAC3B4] Input [Input] Connected to pin [00CACE1C]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {E436EB7A-524F-11CE-9F53-0020AF0BA770}  MEDIASUBTYPE_RGB8
    Not temporally compressed
    Sample size 230400
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 8 bpp c:0
    Image size 230400
    Planes 1
    Pels per metre (0, 0)
    Colours used 256
    AvgTimePerFrame 333333, 30 fps
        Filter [00CA9C8C] Input Video Renderer
              Pin [00CAA064] Input [Input] Connected to pin [03BA33A4]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {E436EB7A-524F-11CE-9F53-0020AF0BA770}  MEDIASUBTYPE_RGB8
    Not temporally compressed
    Sample size 230400
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 8 bpp c:0
    Image size 230400
    Planes 1
    Pels per metre (0, 0)
    Colours used 256
    AvgTimePerFrame 333333, 30 fps
        Filter [02F6AF10] Mux
              Pin [02F6AF70] FLV7 [Input] Connected to pin [02F6FC00]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {37564C46-0000-0010-8000-00AA00389B71}  Unknown GUID Name
    Temporally compressed
    Variable size samples
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:37564c46
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F6B790]  audio [ Input] This pin is not Connected
              Pin [02F6BA08]  out [ Output] This pin is not Connected
        Filter [00CAEADC] AVI Decompressor 0003
              Pin [00CAEC14] XForm In [Input] Connected to pin [02F70D88]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {30323449-0000-0010-8000-00AA00389B71}  Unknown GUID Name
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:30323449
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [00CACE1C] XForm Out [Output] Connected to pin [00CAC3B4]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {E436EB7A-524F-11CE-9F53-0020AF0BA770}  MEDIASUBTYPE_RGB8
    Not temporally compressed
    Sample size 230400
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 8 bpp c:0
    Image size 230400
    Planes 1
    Pels per metre (0, 0)
    Colours used 256
    AvgTimePerFrame 333333, 30 fps
        Filter [03BA326C] AVI Decompressor
              Pin [00CAACD4] XForm In [Input] Connected to pin [02F68BF8]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {56555949-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_IYUV
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:56555949
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [03BA33A4] XForm Out [Output] Connected to pin [00CAA064]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {E436EB7A-524F-11CE-9F53-0020AF0BA770}  MEDIASUBTYPE_RGB8
    Not temporally compressed
    Sample size 230400
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 8 bpp c:0
    Image size 230400
    Planes 1
    Pels per metre (0, 0)
    Colours used 256
    AvgTimePerFrame 333333, 30 fps
        Filter [02F70048] H264 Compressor
              Pin [02F70070] Input [Input] Connected to pin [02F6F898]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32315659-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YV12
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:32315659
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F70D88] Preview [Output] Connected to pin [00CAEC14]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {30323449-0000-0010-8000-00AA00389B71}  Unknown GUID Name
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:30323449
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F6FC00] Output1 [Output] Connected to pin [02F6AF70]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {37564C46-0000-0010-8000-00AA00389B71}  Unknown GUID Name
    Temporally compressed
    Variable size samples
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:37564c46
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F71228]  Output2 [ Output] This pin is not Connected
        Filter [02F68AF0] Input RGB
              Pin [02F68B08] Input [Input] Connected to pin [02F60178]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32315659-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YV12
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:32315659
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F68BF8] Output [Output] Connected to pin [00CAACD4]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {56555949-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_IYUV
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:56555949
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
        Filter [02F6F118] FPS Controller Encoder
              Pin [02F6F128] Input [Input] Connected to pin [02F6E880]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32315659-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YV12
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:32315659
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F6F898] Output [Output] Connected to pin [02F70070]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32315659-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YV12
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:32315659
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
        Filter [02F5FAB8] YV12
              Pin [02F5FAD0] Input [Input] Connected to pin [03BA3F24]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F60178] Output [Output] Connected to pin [02F68B08]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32315659-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YV12
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:32315659
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
        Filter [02F6E778] Resize
              Pin [02F6E790] Input [Input] Connected to pin [02F6E620]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32315659-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YV12
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:32315659
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F6E880] Output [Output] Connected to pin [02F6F128]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32315659-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YV12
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:32315659
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
        Filter [02F6DF60] YV12 0002
              Pin [02F6DF78] Input [Input] Connected to pin [02F6DE00]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F6E620] Output [Output] Connected to pin [02F6E790]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32315659-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YV12
    Not temporally compressed
    Sample size 345600
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 12 bpp c:32315659
    Image size 345600
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
        Filter [02F6D680] FPS Controller Resize
              Pin [02F6D690] Input [Input] Connected to pin [00CA9B6C]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [02F6DE00] Output [Output] Connected to pin [02F6DF78]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
        Filter [00CAB9CC] Video Tee
              Pin [00CABA34] Input [Input] Connected to pin [03B9EE9C]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [03BA3F24] Output1 [Output] Connected to pin [02F5FAD0]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [00CA9B6C] Output2 [Output] Connected to pin [02F6D690]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [03BA3454]  Output3 [ Output] This pin is not Connected
        Filter [00CA99C4] Smart Tee
              Pin [00CA9A2C] Input [Input] Connected to pin [00C0974C]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [03B9EE9C] Capture [Output] Connected to pin [00CABA34]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
              Pin [00CAE204]  Preview [ Output] This pin is not Connected
        Filter [00C0A6DC] SOURCE
              Pin [00C0974C] Video [Output] Connected to pin [00CA9A2C]
    Major type {73646976-0000-0010-8000-00AA00389B71}  MEDIATYPE_Video
    Sub type   {32595559-0000-0010-8000-00AA00389B71}  MEDIASUBTYPE_YUY2
    Not temporally compressed
    Sample size 460800
    Source rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Target rectangle ( Left 0 Top 0 Right 0 Bottom 0)
    Size of BITMAPINFO structure 40
    640 x 360, 16 bpp c:32595559
    Image size 460800
    Planes 1
    Pels per metre (0, 0)
    Colours used 0
    AvgTimePerFrame 333333, 30 fps
    Tue Mar 26 2013 11:42:24 : Session Started
    Tue Mar 26 2013 11:42:24 : Video Encoding Started
    Tue Mar 26 2013 11:47:18 : Video Encoding Stopped
    Tue Mar 26 2013 11:47:18 : Session Stopped
    Tue Mar 26 2013 11:47:18 : Problem with capture device. Incorrect samples given by the device. Stopping encoding session.
    Tue Mar 26 2013 11:47:18 : Primary - Network Command: onFCUnpublish
    Tue Mar 26 2013 11:47:18 : Primary - Stream[fmlestream] Status: NetStream.Unpublish.Success
    Tue Mar 26 2013 11:47:18 :
    ================== Encoding Statistics ====================
                            Current                        
                                           Input              Output
                 Time    Bit Rate     Drops      fps     Drops      fps
    Audio  :                                 
    Video 1:   0:04:50    644 Kbps        72    74.00         0    15.00
                            Average                         
                                           Input              Output
                 Time    Bit Rate     Drops      fps     Drops      fps
    Audio  :                                 
    Video 1:   0:04:50    983 Kbps        75    29.40         0    29.36
    ===========================================================
    ================= Publishing Statistics ===================
             Bandwidth     Buffer   Frame Drops
    Primary:  824 Kbps   0.00 Sec          0
    Backup :    0 Kbps   0.00 Sec          0
    ===========================================================
    Tue Mar 26 2013 11:47:18 : Failed with error 80040273:CoCreateInstance(CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC, IID_IBaseFilter, pFilterVideoMixingRenderer.ppv())
    Tue Mar 26 2013 11:47:56 : Primary - Network Status: NetConnection.Connect.Closed status
    Tue Mar 26 2013 11:47:56 : Primary - Disconnected
    Thank you for your assistance
    Richard

    Please attach the session log file.

  • New table without statistics returns invalid number of rows

    Hi,
    I've been searching for a while now for an explanation for the following "problem"
    We have an Oracle 11.1.0.7 database on AIX5.3
    In this database we have two tables, called KRT_PRODUCTS_INFO and KRT_STRUCTURES_INFO ( the table name don't really matter ).
    The scenario is as following:
    If we recreate these tables like:
    CREATE TABLE KRT_PRODUCT_INFO_BUP AS SELECT * FROM KRT_PRODUCT_INFO;
    DROP TABLE KRT_PRODUCT_INFO CASCADE CONSTRAINTS;
    CREATE TABLE KRT_PRODUCT_INFO (...) TABLESPACE PIM_DATA NOLOGGING NOCOMPRESS NOCACHE NOPARALLEL MONITORING;
    CREATE INDEX KRT_PRODUCT_INFO_X1 ON KRT_PRODUCT_INFO (PRODUCT_NUMBER) NOLOGGING TABLESPACE PIM_DATA NOPARALLEL;
    CREATE INDEX KRT_PRODUCT_INFO_X2 ON KRT_PRODUCT_INFO (PIM_ARTICLEREVISIONID) NOLOGGING TABLESPACE PIM_DATA NOPARALLEL;
    INSERT INTO KRT_PRODUCT_INFO (SELECT * FROM KRT_PRODUCT_INFO_BUP);
    COMMIT;
    CREATE TABLE KRT_STRUCTURE_INFO_BUP AS SELECT * FROM KRT_STRUCTURE_INFO;
    DROP TABLE KRT_STRUCTURE_INFO CASCADE CONSTRAINTS;
    CREATE TABLE KRT_STRUCTURE_INFO (...) TABLESPACE PIM_DATA NOLOGGING NOCOMPRESS NOCACHE NOPARALLEL MONITORING;
    CREATE INDEX KRT_STRUCTURES_X1 ON KRT_STRUCTURE_INFO (STRUCTURE_GRP_REV_ID) NOLOGGING TABLESPACE PIM_DATA NOPARALLEL;
    CREATE INDEX KRT_STRUCTURES_X2 ON KRT_STRUCTURE_INFO (STRUCTURE_GRP_IDENTIFIER) NOLOGGING TABLESPACE PIM_DATA NOPARALLEL;
    CREATE INDEX KRT_STRUCTURES_X3 ON KRT_STRUCTURE_INFO (STRUCTURE_GRP_ID) NOLOGGING TABLESPACE PIM_DATA NOPARALLEL;
    INSERT INTO KRT_STRUCTURE_INFO (SELECT * FROM KRT_STRUCTURE_INFO_BUP);
    COMMIT;
    and we run a complex query with these two tables, this query only return a couple of rows ( exactly 24 !!! )
    If we however generate statistics on these tables after creation, the correct number of rows is returned, being 1.167.991 rows
    The statistics are gathered using:
    BEGIN
    SYS.DBMS_STATS.GATHER_TABLE_STATS (
    OwnName => 'PIM_KRG'
    ,TabName => 'KRT_PRODUCT_INFO'
    ,Estimate_Percent => NULL
    ,Method_Opt => 'FOR ALL COLUMNS SIZE REPEAT '
    ,Degree => NULL
    ,Cascade => TRUE
    ,No_Invalidate => FALSE);
    END;
    BEGIN
    SYS.DBMS_STATS.GATHER_TABLE_STATS (
    OwnName => 'PIM_KRG'
    ,TabName => 'KRT_STRUCTURE_INFO'
    ,Estimate_Percent => NULL
    ,Method_Opt => 'FOR ALL COLUMNS SIZE REPEAT '
    ,Degree => NULL
    ,Cascade => TRUE
    ,No_Invalidate => FALSE);
    END;
    /I can imagine that the 'plan' for the query used is wrong because of missing statistics.
    But I can't imagine that it would actually return an incorrect number of rows.
    I tested this behaviour in Toad and sqlplus ( first thought it was Toad ), and both behave the same.
    Another fact is, that the "problem" is NOT reproducable on our TEST environment, that runs on Oracle 11.1.0.7 on Windows2008
    Just to be sure this is the "complex" query used. It is not developed by me, and I think it looks somewhat strange but that shouldn't matter:
    SELECT sr."Identifier" STRUCTURE_IDENTIFIER
    , ar_i."Identifier" ITEM_NUMBER
    , SUM (REPLACE (NVL (s.HIDE_LE10, 0) + NVL (p.HIDE_LE10, 0), 2, 1))
    hide_le10
    , SUM (REPLACE (NVL (s.HIDE_LE30, 0) + NVL (p.HIDE_LE30, 0), 2, 1))
    hide_le30
    , SUM (REPLACE (NVL (s.HIDE_LE40, 0) + NVL (p.HIDE_LE40, 0), 2, 1))
    hide_le40
    , SUM (REPLACE (NVL (s.HIDE_LE50, 0) + NVL (p.HIDE_LE50, 0), 2, 1))
    hide_le50
    , SUM (REPLACE (NVL (s.HIDE_LE55, 0) + NVL (p.HIDE_LE55, 0), 2, 1))
    hide_le55
    , SUM (REPLACE (NVL (s.HIDE_LE60, 0) + NVL (p.HIDE_LE60, 0), 2, 1))
    hide_le60
    , SUM (REPLACE (NVL (s.HIDE_LE70, 0) + NVL (p.HIDE_LE70, 0), 2, 1))
    hide_le70
    , SUM (REPLACE (NVL (s.HIDE_LE75, 0) + NVL (p.HIDE_LE75, 0), 2, 1))
    hide_le75
    , SUM (REPLACE (NVL (s.HIDE_LE58, 0) + NVL (p.HIDE_LE58, 0), 2, 1))
    hide_le58
    , SUM (REPLACE (NVL (s.HIDE_LE80, 0) + NVL (p.HIDE_LE80, 0), 2, 1))
    hide_le80
    , SUM (REPLACE (NVL (s.HIDE_LE90, 0) + NVL (p.HIDE_LE90, 0), 2, 1))
    hide_le90
    , SUM (REPLACE (NVL (s.HIDE_LE92, 0) + NVL (p.HIDE_LE92, 0), 2, 1))
    hide_le92
    , SUM (REPLACE (NVL (s.HIDE_LE94, 0) + NVL (p.HIDE_LE94, 0), 2, 1))
    hide_le94
    , SUM (REPLACE (NVL (s.HIDE_LE96, 0) + NVL (p.HIDE_LE96, 0), 2, 1))
    hide_le96
    , COUNT (*) cnt
    FROM KRAMP_HPM_MAIN."StructureRevision" sr
    , KRAMP_HPM_MAIN."StructureGroupRevision" sgr
    , KRAMP_HPM_MASTER."ArticleStructureMap" asm
    , KRAMP_HPM_MASTER."ArticleRevision" ar_p
    , KRAMP_HPM_MASTER."ArticleDetail" ad_p
    , KRAMP_HPM_MASTER."ArticleRevision" ar_i
    , KRAMP_HPM_MASTER."ArticleDetail" ad_i
    , KRAMP_HPM_MASTER."ArticleReference" ar
    , KRT_STRUCTURE_INFO s
    , KRT_PRODUCT_INFO p
    WHERE sr."StructureID" = sgr."StructureID"
    AND sgr."StructureGroupID" = asm."StructureGroupID"
    AND ar_p."ID" = asm."ArticleRevisionID"
    AND ar_p."ID" = ad_p."ArticleRevisionID"
    AND ad_p."Res_Text100_02" = 'PRODUCT'
    AND ar_i."ID" = ad_i."ArticleRevisionID"
    AND ad_i."Res_Text100_02" = 'ARTICLE'
    AND ar."ArticleRevisionID" = ar_p."ID"
    AND ar."ReferencedSupplierAID" = ar_i."Identifier"
    AND s.STRUCTURE_GRP_REV_ID = sgr."ID"
    AND p.PIM_ARTICLEREVISIONID = ar_p."ID"
    GROUP BY sr."Identifier", ar_i."Identifier";Any ideas are welcome..
    Thanks
    FJFranken

    Hemant K Chitale wrote:
    These two tables are in the PIM_KRG schema while the other tables in the query are distributed across two other schemas "KRAMP_HPM_MAIN" and "KRAMP_HPM_MASTER" ?
    Do you happen to have the same table names occurring in multiple schemas - the query is then referencing the data in the wrong schema ?
    Hemant K ChitaleHi,
    This is not the case. The KRAMP_HPM schema's are application dedicated schema's
    And this also then does not explain why the results are correct after generating statistics.
    Anyway thanks for the tip.
    FJFranken

  • How do you return the number of Rows in a ResultSet??

    How do you return the number of Rows in a ResultSet? It's easy enough to do in the SQL query using COUNT(*) but surely JDBC provides a method to return the number of rows.
    The ResultSetMetaData interface provides a method for counting the number of columns but nothing for the rows.
    Thanks

    No good way before JDBC2.0. u can use JDBC2.0 CachedRowSet.size() to retrieve the number of rows got by a ResultSet.

  • Return specific number of rows depending on the data in a column in table

    Hi,
    I have a table named orders which has column orderid and noofbookstoorder in addition to other columns.
    I want to query the orders table and depending on the value of the 'noofbookstoorder' value return that number of rows.
    Eg
    Orderid noofbookstoorder
    1 1
    2 3
    3 2
    when I query the above data saying
    select * from orders where orderid=2;
    since it has noofbookstoorders value as 3 the query should return 3 rows and when I query
    select * from orders where orderid=3;
    it should return 2 rows and
    select * from orders where orderid=1;
    should return 1 row.
    Is it possible to achieve this. If yes, then how do I write my query.
    Thanks in advance.

    with t as (
               select 1 Orderid,1 noofbookstoorder from dual union all
               select 2,3 from dual union all
               select 3,2 from dual
    select  t.*
      from  t,
            table(cast(multiset(select 1 from dual connect by level <= noofbookstoorder) as sys.OdciNumberList))
      where Orderid = <order-id>
    /For example:
    SQL> with t as (
      2             select 1 Orderid,1 noofbookstoorder from dual union all
      3             select 2,3 from dual union all
      4             select 3,2 from dual
      5            )
      6  select  t.*
      7    from  t,
      8          table(cast(multiset(select 1 from dual connect by level <= noofbookstoorder) as sys.OdciNumberList))
      9    where Orderid = 2
    10  /
       ORDERID NOOFBOOKSTOORDER
             2                3
             2                3
             2                3
    SQL> with t as (
      2             select 1 Orderid,1 noofbookstoorder from dual union all
      3             select 2,3 from dual union all
      4             select 3,2 from dual
      5            )
      6  select  t.*
      7    from  t,
      8          table(cast(multiset(select 1 from dual connect by level <= noofbookstoorder) as sys.OdciNumberList))
      9    where Orderid = 3
    10  /
       ORDERID NOOFBOOKSTOORDER
             3                2
             3                2
    SQL> with t as (
      2             select 1 Orderid,1 noofbookstoorder from dual union all
      3             select 2,3 from dual union all
      4             select 3,2 from dual
      5            )
      6  select  t.*
      7    from  t,
      8          table(cast(multiset(select 1 from dual connect by level <= noofbookstoorder) as sys.Odc
    iNumberList))
      9    where Orderid = 1
    10  /
       ORDERID NOOFBOOKSTOORDER
             1                1
    SQL>  -- And if you want to select multiple orders
    SQL> with t as (
      2             select 1 Orderid,1 noofbookstoorder from dual union all
      3             select 2,3 from dual union all
      4             select 3,2 from dual
      5            )
      6  select  t.*
      7    from  t,
      8          table(cast(multiset(select 1 from dual connect by level <= noofbookstoorder) as sys.Odc
    iNumberList))
      9    where Orderid in (2,3)
    10  /
       ORDERID NOOFBOOKSTOORDER
             2                3
             2                3
             2                3
             3                2
             3                2
    SQL> SY.
    Edited by: Solomon Yakobson on Oct 26, 2009 7:36 AM

  • Loop through a csv file and return the number of rows in it?

    What would be simplest way to loop through a csv file and
    return the number of rows in it?
    <cffile action="read" file="#filename#" output="#csvstr#"
    >
    <LOOP THROUGH AND COUNT ROWS>

    ListLen(). Use chr(13) as your delimiter

  • Oracle RDB Driver fails with JDBC/ODBC Bridge

    Has anyone experienced problems using the latest Oracle RDB
    Driver (3.0.2.0) with the JDBC/ODBC Bridge.
    We have been using the Oracle ODBC Driver for RDB (2.10.17)
    successfully on NT, but it is not supported on W2K. The new
    drivers work fine for Access etc., but fail with the bridge.
    Specifically, you can step thru a result set, but getObject()
    returns null for all fields.
    Any suggestions?
    Joe

    This forum is for general suggestions and feedback about the OTN
    site. For technical question about an Oracle product, you can
    select the appropriate discussion forum in our 'Discussions'
    section at: http://forums.oracle.com/forums/homepage.jsp
    Best regards, OTN Team

Maybe you are looking for

  • ITouch won't work unless I connect to iTunes...but...

    My iTouch says that it needs to connect to iTunes, but when I connect to iTunes it wants me to enter my iTouch passcode. I can't enter the passcode because the alert telling me to connect to iTunes is on the screen. I'M STUCK!! Please hel!! Thanks!

  • How to find out the schedule agreement number from the invoice number?

    I have invoice number based on which i need to check the scheduleagreenment number please let me know in which table i can find the relation between these two.

  • BAPI or FM for Condition Pricing

    Hi All I need to develop a report that shows all the condition pricing (SD). It is necessary to show the same fields of the pricing screen (VA03) -  it would be a kind of simulation. I would like some function that gives me a report similar to the sc

  • Zen 8Gb: problems to find all so

    Hej all, I have just recently purchased the Zen 8 Gb and uploaded many songs today. Somehow I am not able to locate them all, seems like some of my folders are not to be played ?!?! They are starting with a number, does any of you experience the same

  • Web to PDF - Convert to PDF/X-3 (Error: file specifications present)

    I took a simple webpage consisting of two images and some text and used the Adobe Acrobat X Pro function "PDF to Web" to make a pdf of it, which looks perfectly good. I need to export it as a PDX/X-3 compliant pdf however in preflight I get the error