?
Solved

ORA-03115: unsupported network datatype or representation?

Posted on 2006-04-01
2
Medium Priority
?
10,281 Views
Last Modified: 2010-05-18
I'm using Java 1.5, Tomcat, and Oracle 10g XE.  The following code gives me an ORA-03115 error:

      public boolean updateModuleScore(int sessID, int module, int score)
            {
               boolean success = false;

               String sql =
                  "UPDATE MODULERESULTS " +
                  "SET COMPLETIONDATE=SYSDATE,SCORE=? " +
                  "WHERE SESSIONID=? AND MODULE=?";

               PreparedStatement pst = null ;
               Connection con = null;

            try
            {
                  con = DBConnect.getConnection();

                  pst = con.prepareStatement(sql);
                  pst.setInt(1,score);
                  pst.setInt(2,sessID);
                  pst.setInt(3,module);

                  System.out.println("executeQuery");
                  pst.executeQuery(sql);
                  System.out.println("executeQuery done");

                  success = true ;
                  System.out.println("Updated Module ModuleResults");
            }
            catch (SQLException e)
            {
                success = false ;
                  System.out.println(e.getMessage());
                  setError(e);
            }

            finally
            {
                  close(con,pst);
            }

            return success;
      }

The exception occurs on the executeQuery() statement.

The table is defined as follows:

SESSIONID NUMBER(9,0)
MODULE NUMBER(3,0)
COMPLETIONDATE DATE
SCORE NUMBER(3,0)

We're using pooled connections thorugh JNDI.  When I downloaded a different version of ojdbc14.jar from the Oracle site to see if that fixed this problem, the pooled connections no longer worked.  Apparently there are several different versions of ojdbc14.jar, all with different file sizes, but I can't figure out how to tell the difference between them.

Please help!!!
0
Comment
Question by:GaryW021199
2 Comments
 
LVL 6

Accepted Solution

by:
DLyall earned 2000 total points
ID: 16354768
Try using the "executeUpdate()" method of interface "java.sql.PreparedStatement" (and not the "executeQuery()" method).


0
 

Expert Comment

by:princedudley
ID: 21243610
You should use
pst.executeQuery();
instead of using pst.executeQuery(sql);
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to recover a database from a user managed backup
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question