当前位置: 技术问答>java相关
Dreamwaver开发JSP的问题,求教!急!
来源: 互联网 发布时间:2015-09-29
本文导语: 开发环境: Windows 2000 professional SP2 Tomcat 3.31 Sql Server 2000 个人版 SP2 Dreamwaver UltraDev 4.01 英文版 Microsoft SQL Server 2000 Driver for JDBC 问题: 在删除记录的时候,在WEB服务器端,总是会出现异常,但是对执行和执...
开发环境:
Windows 2000 professional SP2
Tomcat 3.31
Sql Server 2000 个人版 SP2
Dreamwaver UltraDev 4.01 英文版
Microsoft SQL Server 2000 Driver for JDBC
问题:
在删除记录的时候,在WEB服务器端,总是会出现异常,但是对执行和执行结果并没有任何的影响。
我先创建一个RecordSet,然后,添加Server Behaviors中的Delete Record,
我相信我在每个对话框中,添加的值,都是合适的。
但是,在运行的时候,虽然数据可以正常删掉,但在,Tomcat的显示信息中,总会出现如下的异常信息。
所有的Jsp代码,都是由Dreamwaver自动生成的,没有做任何的改动。
2002-05-06 21:24:40 - Ctx(/ftsAdmin) : Exception in R( /ftsAdmin + /manageFileType.jsp + null) - javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for th
e current cursor position.
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
at manageFileType_10._jspService(manageFileType_10.java:341)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:479)
Root cause:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for the current cursor position.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.validateCursorPosition(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.getObject(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.getObject(Unknown Source)
at manageFileType_10._jspService(manageFileType_10.java:287)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:479)
2002-05-06 21:24:40 - ErrorHandler: Error loop for R( /ftsAdmin + /manageFileType.jsp + null) error javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for
the current cursor position.
Windows 2000 professional SP2
Tomcat 3.31
Sql Server 2000 个人版 SP2
Dreamwaver UltraDev 4.01 英文版
Microsoft SQL Server 2000 Driver for JDBC
问题:
在删除记录的时候,在WEB服务器端,总是会出现异常,但是对执行和执行结果并没有任何的影响。
我先创建一个RecordSet,然后,添加Server Behaviors中的Delete Record,
我相信我在每个对话框中,添加的值,都是合适的。
但是,在运行的时候,虽然数据可以正常删掉,但在,Tomcat的显示信息中,总会出现如下的异常信息。
所有的Jsp代码,都是由Dreamwaver自动生成的,没有做任何的改动。
2002-05-06 21:24:40 - Ctx(/ftsAdmin) : Exception in R( /ftsAdmin + /manageFileType.jsp + null) - javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for th
e current cursor position.
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
at manageFileType_10._jspService(manageFileType_10.java:341)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:479)
Root cause:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for the current cursor position.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.validateCursorPosition(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.getObject(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.getObject(Unknown Source)
at manageFileType_10._jspService(manageFileType_10.java:287)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:479)
2002-05-06 21:24:40 - ErrorHandler: Error loop for R( /ftsAdmin + /manageFileType.jsp + null) error javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid operation for
the current cursor position.
|
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.executeUpdate();
MM_connection.close();改成:
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.executeUpdate();
MM_editStatement.close();
MM_connection.close();
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.executeUpdate();
MM_connection.close();改成
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.executeUpdate();
MM_editStatement.close();
MM_connection.close();
这回试一下。
如果不行在这样试一下
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.executeUpdate();
MM_connection.close();改成:
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.execute();
MM_editStatement.close();
MM_connection.close();
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.executeUpdate();
MM_connection.close();改成
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.execute();
MM_editStatement.close();
MM_connection.close();
|
多半你执行添加、删除数据记录的SQL语句后,赋值给了RecordSet对象:
RecordSet rs=stmt.executeQuery("insert into ..") 这样是不对的。
没看见你的代码,上述只是错误产生的可能性
RecordSet rs=stmt.executeQuery("insert into ..") 这样是不对的。
没看见你的代码,上述只是错误产生的可能性
|
jdbc驱动程序是什么?jdbc_odbc桥吗?换专用的试试。
|
代码贴出来看看把
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。