tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weßling, Achim" <Achim.Wessl...@gt-net.de>
Subject JDBC-TagLib with JDBC-ODBC-Bridge?!
Date Mon, 02 Apr 2001 09:58:39 GMT
Hallo,

does someone use the JDBC-TagLib with the JDBC-ODBC-Bridge to Access?

I try inserting something and it doesn't work. Here is my code:

<%-- Open Database Connection --%>
<jdbc:connection id="conn">
    <jdbc:url>jdbc:odbc:user</jdbc:url>
    <jdbc:driver>sun.jdbc.odbc.JdbcOdbcDriver</jdbc:driver>
</jdbc:connection>
<%-- Open Database --%>
    <jdbc:preparedStatement id="stmt" conn="conn">
        <jdbc:query>
            INSERT INTO test (Wert1, Wert2) values (?, ?)
        </jdbc:query>
        <jdbc:execute>
            <jdbc:setColumn position="1">hier</jdbc:setColumn>
            <jdbc:setColumn position="2">Achim</jdbc:setColumn>
        </jdbc:execute>
    </jdbc:preparedStatement>
</jdbc:equals>

<%-- close Database Connection --%>
<jdbc:closeConnection conn="conn"/>
<br>It has to be done!

I get the following error:

Error: 500
Location: /TagLib/testing.jsp
Internal Servlet Error:
javax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC
Microsoft Access Driver] Operation must use an updateable query.
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
_0002ftesting_0002ejsptesting_jsp_2._jspService(_0002ftesting_0002ejsptestin
g_jsp_2.java:404)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Root cause:
javax.servlet.jsp.JspTagException: java.sql.SQLException: [Microsoft][ODBC
Microsoft Access Driver] Operation must use an updateable query.
at
de.infokomGT.taglib.jdbc.statement.ExecuteTag.doEndTag(ExecuteTag.java:119)
at
_0002ftesting_0002ejsptesting_jsp_2._jspService(_0002ftesting_0002ejsptestin
g_jsp_2.java:347)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

I didn't know what 'Operation must use an updateable query' means.
Could someone help?

Mit freundlichem Gruß

Achim Weßling

**************************************************************************
INFOKOM Gütersloh
Fachbereich Technische Anwendungen / Zentrale Anwendungen
Tel.: 05241/85-2926
Achim.Wessling@gt-net.de
http://www.infokom-gt.de/produkte/gis/index.htm


                  _\|/_
                  (o o)
       ---oOO-{_}-OOo---



Mime
View raw message