Results 1 to 6 of 6
- 02-10-2012, 07:31 AM #1
Senior Member
- Join Date
- Jan 2012
- Posts
- 210
- Rep Power
- 2
CachedRowSet wont update data source
While experimenting with CachedRowSet object, I got this error message, when try to update data source:
This is code that I use for this purpose:
And this is error message:XML Code:String cn = crs.getString("COF_NAME"); if (cn.equals("Colombian")) { crs.updateFloat("PRICE", 888); crs.updateRow(); crs.acceptChanges(); }
Any idea why this happened?XML Code:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.coffees WHERE COF_NAME = 'Colombian' AND SUP_ID = 101 AND PRICE = 777.00 AND SA' at line 1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293) at com.sun.rowset.internal.CachedRowSetWriter.updateOriginalRow(CachedRowSetWriter.java:517) at com.sun.rowset.internal.CachedRowSetWriter.writeData(CachedRowSetWriter.java:361) at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:880) at package1.ViewTable.getRowSet(ViewTable.java:232) at package1.ViewTable.main(ViewTable.java:247) javax.sql.rowset.spi.SyncProviderException: 9conflicts while synchronizing
- 02-10-2012, 07:56 AM #2
Re: CachedRowSet wont update data source
Just might be related to this reported bug: MySQL Bugs: #43571: Driver attempts to perform SHOW FULL COLUMNS on a non-existent temporary table.
You could try the suggestion near the bottom of that page (if for nothing else, then to assure yourself it's NOT related to the bug)
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 02-10-2012, 08:43 AM #3
Senior Member
- Join Date
- Jan 2012
- Posts
- 210
- Rep Power
- 2
Re: CachedRowSet wont update data source
I'v tried to use url like suggested:
"jdbc:mysql://localhost:3306/test?"+"useDynamicCharsetInfo=false"
but no help.
- 02-10-2012, 09:40 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: CachedRowSet wont update data source
What's the query used to populate the CRS?
- 02-10-2012, 09:49 AM #5
Senior Member
- Join Date
- Jan 2012
- Posts
- 210
- Rep Power
- 2
- 02-10-2012, 12:00 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Similar Threads
-
SQL commands on a CachedRowSet completely offline?
By spikenigma in forum JDBCReplies: 3Last Post: 01-16-2012, 11:12 AM -
panel wont update when repaint is called
By yemista in forum AWT / SwingReplies: 3Last Post: 10-25-2011, 06:58 PM -
to log the very fast data source
By jerry_nf in forum Threads and SynchronizationReplies: 3Last Post: 03-26-2011, 05:21 AM -
Update JTable data
By DC200 in forum AWT / SwingReplies: 8Last Post: 03-30-2010, 10:10 PM -
Sorting CachedRowset
By Sayed in forum Advanced JavaReplies: 0Last Post: 07-18-2008, 12:14 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks