Hi,
I am using DB2 7.2 for win,struts 1.1 beta2 ver.
I can use connection pool in select statements,and I have no problem.On the other hand when I tried insert statements I got no exceptions, but no data is inserted.
But when I only change the connection from :
dataSource = (DataSource)servlet.getServletContext().getAttribute("org.apache.struts.action.DATA_SOURCE");
conn=dataSource.getConnection();
to:
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
conn=java.sql.DriverManager.getConnection("jdbc:db2/localhost:50006/XXXXXX","username","password");
I can insert data with the same query string.
My data source conf in struts-config looks like:
<data-sources>
<data-source>
<set-property property="autoCommit"
value="false"/>
<set-property property="description"
value="DB2 Query"/>
<set-property property="driverClass"
value="COM.ibm.db2.jdbc.net.DB2Driver"/>
<set-property property="maxCount"
value="4"/>
<set-property property="minCount"
value="2"/>
<set-property property="password"
value="password"/>
<set-property property="url"
value="jdbc:db2/localhost:50006/XXXXXX"/>
<set-property property="user"
value="username"/>
</data-source>
</data-sources>

Is it a bug or a configuration or a programming problem?Any idea????


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to