jConnect 5.2 and LOCK TABLE command 
Author Message
 jConnect 5.2 and LOCK TABLE command

Hi, I'm trying to execute a query 'LOCK TABLE <tableName> ....'
but am getting the following error :

                        "com.sybase.jdbc2.jdbc.SybSQLException:
                        A LOCK TABLE command is not allowed
                        outside the scope of a transaction on
                        table 'wf_id_range' in the database
                        'nasqadev'. ".

                    SQL Statement :
                        LOCK TABLE wf_id_range IN EXCLUSIVE
                             MODE WAIT 60

    I'm using Sybase's jConnect 5.2 Driver.  I'm doing the usual stuff :

getting a connection, setting autoCommit to false and executing the
query(not sure why it says that the query is being run outside the scope

of a transaction).

Has anyone seen this before?

Thanks,
--srinivas



Wed, 02 Jul 2003 12:11:33 GMT
 jConnect 5.2 and LOCK TABLE command

**** Post for FREE via your newsreader at post.usenet.com ****

Quote:

> Hi, I'm trying to execute a query 'LOCK TABLE <tableName> ....'
> but am getting the following error :

        you need to do -

        begin tran

        ....

        commit

Quote:
>     I'm using Sybase's jConnect 5.2 Driver.  I'm doing the usual stuff :

> getting a connection, setting autoCommit to false and executing the
> query(not sure why it says that the query is being run outside the scope
> of a transaction).

        I'm not sure how autoCommit works with jConnect but I seem to recall
        that the flag in PowerBuilder wasn't intuitive.

-am

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
                      http://www.usenet.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Thu, 03 Jul 2003 14:30:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. jConnect and LOCK TABLE command

2. jConnect 5.2: Locales for OSG

3. Problem doing one phase commit with JConnect 5.2

4. Help Command Center ver 5.2

5. Abort on EV Command - Unidata 5.2

6. Locking problems with Clipper 5.2

7. Temp or Perm Tables on UDB 5.2 for Performance

8. Newbie Help Unidata 5.2 and missing tables?

9. ALTER TABLE command generates many locks

10. Locking of tables during Begin/Commit trans command.

11. TDSTunnelServlet w/ jdk1.2.1, Apache 1.3.3, JServ 1.0, JConnect 5.2 - config prob?

12. Update command is locked by a select command.


 
Powered by phpBB® Forum Software