Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

com.sybase.jdbc4.jdbc.SybSQLException: SQL Anywhere Error -210: User 'user' has the row in 'datatable' locked JConnect 7

215 views
Skip to first unread message

mel

unread,
Feb 26, 2012, 11:05:06 PM2/26/12
to
I am having a problem with row locking in a situation where according
to the environment settings and the way the software works this should
not happening. To illustrate why I think it should not be possible for
one record in the "tabledata" to be locked, here is how the software
works.

1. For any user to edit a record in the table "datatable", the user
has to check a custom locking system that maintains a list of records
that are currently being held for editing by another user.
2. If that record is available for editing then submit the record ID
to the custom locking system
3. If successfully submitted to custom locking system then open the
record and start editing
4. When user is finished editing the record then remove the RECORD ID
from the custom locking system
5. The database is running with ISOLATION LEVEL set to 0
6. The database is running with global BLOCKING set to OFF
7. Running Sybase SQlAnywhere 11
8. Using JConnect version 7


So when I get a lock message from the system I have difficulty
understanding how it is possible for two users/connections to try to
update the same record.

How can I trace (maybe using logging or any other technique) how the
record is getting locked

Thanks,

Melody

mel

unread,
Feb 26, 2012, 11:36:24 PM2/26/12
to
Just to provide more details below is the stack trace
com.sybase.jdbc4.jdbc.SybSQLException: SQL Anywhere Error -210: User
'brcastil' has the row in 'st_data' locked
at com.sybase.jdbc4.tds.Tds.a(Unknown Source)
at com.sybase.jdbc4.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.updateLoop(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(Unknown Source)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeUpdate(Unknown
Source)

It happens when I run an UPDATE STATEMENT on table "tabledata" to
update one field

UPDATE st_data SET myfield = ?;
Statement.executeUpdate();
0 new messages