Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General Error

Status
Not open for further replies.

onlymullapudi

Programmer
Apr 20, 2006
9
US
Hai

I am trying to retrive the video file from a table, and it is saying general error.can anyone try to solve the problem. i am using oracle 10g,tomcat5 and jdk

The code is


<HTML>
<HEAD>
</HEAD>
<BODY bgcolor="pink">
<%@ page import="oracle.ord.im.OrdVideo" %>
<%@ page import="oracle.jdbc.OraclePreparedStatement" %>
<%@ page import="oracle.jdbc.OracleResultSet" %>

<%@ page import="oracle.jdbc.driver.*" %>
<%@ page import="oracle.sql.*" %>



<%@ page import="java.sql.*" %>
<%@ page import="java.io.File" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.io.*" %>


<%@ page import="javax.servlet.*" %>
<%@ page import="javax.servlet.http.*;" %>


<CENTER>
<%

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:eek:dbc:intelligent","system","indublin");

try
{

OrdVideo vp;
out.println("gdjhg");
out.println("gdjhg");

OraclePreparedStatement ps=(OraclePreparedStatement)con.prepareStatement("select vid from t1 where id= ? for update");
ps.setString(1,"12");
OracleResultSet rs = (OracleResultSet)ps.executeQuery( );


out.println("gdjhg");

while(rs.next())
{
OrdVideo videoproxy = (OrdVideo)rs.getORAData("vid", OrdVideo.getORADataFactory());
videoproxy.loadDataFromFile("er.wma");
}

}
catch(IOException e)
{
out.println(e.getMessage()+"I/O exception");
}
finally {
try {
if(con != null) con.close();
} catch (SQLException ignored) { }
}


%>


</center>
</body>
</html>



And the error message is:

java.sql.SQLException: General error
sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6987)
sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
sun.jdbc.odbc.JdbcOdbc.SQLPrepare(JdbcOdbc.java:4831)
sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:475)
sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:443)
org.apache.jsp.home.ret2_jsp._jspService(ret2_jsp.java:89)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top