Re: SQL ExcuteQuery

2009-12-08 Thread musomesa
Dec 8, 2009 12:59 am Subject: SQL ExcuteQuery dear all I've written Connection conn = null; PreparedStatement pstmtname = null; pstmtname = conn.prepareStatement(sql); sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID = " + UserID; pstmtname.setString(1

Re: SQL ExcuteQuery

2009-12-07 Thread Saeed Iqbal
I dont see you make database connection like this for example. conn = DriverManager.getConnection ("jdbc:mysql://your_host:3306/dbName","dbUser","dbPass"); On Tue, Dec 8, 2009 at 10:59 AM, Nguyen Xuan Son wrote: > dear all > I've written > Connection conn = null; > PreparedStatement pstmtnam

RE: SQL ExcuteQuery

2009-12-07 Thread Vishnu Vyasan Nelliparmbil
will work for sure... BTB Remember this is strictly a struts mailing list. Best Regards Vishnu NV -Original Message- From: Avlesh Singh [mailto:avl...@gmail.com] Sent: Tuesday, December 08, 2009 9:10 AM To: Struts Users Mailing List Subject: Re: SQL ExcuteQuery Use #executeUpdate instea

Re: SQL ExcuteQuery

2009-12-07 Thread Sushim Saini
sorry use executeUpdate On Tue, Dec 8, 2009 at 11:53, Nguyen Xuan Son wrote: > dear singgh > I've tried to user the excuteUpdate but the errors appear > detail is > > java.sql.SQLException: Can not issue executeUpdate() for SELECTs >at com.mysql.jdbc.SQLError.createSQLException(SQLError.

Re: SQL ExcuteQuery

2009-12-07 Thread Nguyen Xuan Son
dear singgh I've tried to user the excuteUpdate but the errors appear detail is java.sql.SQLException: Can not issue executeUpdate() for SELECTs at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)

Re: SQL ExcuteQuery

2009-12-07 Thread Avlesh Singh
Use #executeUpdate instead. Cheers Avlesh On Tue, Dec 8, 2009 at 11:37 AM, Nguyen Xuan Son wrote: > sorry saini but i dont see any different from your answer > thank you > > 2009/12/8 Sushim Saini > > > hi Nguyen Xuan Son > > use > > pstmtname.executeQuery() instead of pstmtname.executeQuery()

Re: SQL ExcuteQuery

2009-12-07 Thread Nguyen Xuan Son
sorry saini but i dont see any different from your answer thank you 2009/12/8 Sushim Saini > hi Nguyen Xuan Son > use > pstmtname.executeQuery() instead of pstmtname.executeQuery(); > > On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son wrote: > > > dear all > > I've written > > Connection conn = nu

Re: SQL ExcuteQuery

2009-12-07 Thread Sushim Saini
hi Nguyen Xuan Son use pstmtname.executeQuery() instead of pstmtname.executeQuery(); On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son wrote: > dear all > I've written > Connection conn = null; > PreparedStatement pstmtname = null; > pstmtname = conn.prepareStatement(sql); > sql = "UPDATE tbl_conte

SQL ExcuteQuery

2009-12-07 Thread Nguyen Xuan Son
dear all I've written Connection conn = null; PreparedStatement pstmtname = null; pstmtname = conn.prepareStatement(sql); sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID = " + UserID; pstmtname.setString(1, "123456"); pstmtname.executeQuery(); there is no error appear bu