Results 1 to 9 of 9

Thread: autocommit mode

  1. #1
    Join Date
    Jun 2003
    Posts
    13

    Unanswered: autocommit mode

    I am doing a web system connecting to sybase database.. i am using jconn2.jar as the driver.. i wanna set the auto-commit false but this is the error i get

    Database failed in setting the auto-commit mode.
    caused by SET CHAINED command not allowed within multi-statement transaction.

    how can i solve this? thanks

  2. #2
    Join Date
    Dec 2002
    Posts
    104

    Re: autocommit mode

    Originally posted by mfkow
    I am doing a web system connecting to sybase database.. i am using jconn2.jar as the driver.. i wanna set the auto-commit false but this is the error i get

    Database failed in setting the auto-commit mode.
    caused by SET CHAINED command not allowed within multi-statement transaction.

    how can i solve this? thanks
    hi,

    just a try....

    try to setAutoCommit(false) when u make a connection with sybase database.

    --Pooja

  3. #3
    Join Date
    Jun 2003
    Posts
    13
    i have set the autocommit = false...
    i am using AES 12.5 and i just read an article that you can only set chained on session. is that mean that i have to set it in every connection??

  4. #4
    Join Date
    Dec 2002
    Posts
    104
    Originally posted by mfkow
    i have set the autocommit = false...
    i am using AES 12.5 and i just read an article that you can only set chained on session. is that mean that i have to set it in every connection??
    yes thats why i asked to set it when u make connection with sybase.
    --Pooja

  5. #5
    Join Date
    Jun 2003
    Posts
    13
    i have set it. but still the prob appear... would it b JDBC driver prob?

  6. #6
    Join Date
    Dec 2002
    Posts
    104
    Originally posted by mfkow
    i have set it. but still the prob appear... would it b JDBC driver prob?
    i am assuming that u want ur transactions to commit in chained mode..correct me if i am wrong.

    i faced the similar problem. so what i did was i wrote this command setAutoCommit(false) just below the function makeConnectionToSybase().


    Hope this will help u..

    --Pooja

  7. #7
    Join Date
    Jun 2003
    Posts
    13
    all those code i put in a class file.. and i set it everytime i connect to the server. but the error is

    SET CHAINED command not allowed within multi-statement transaction.

  8. #8
    Join Date
    Dec 2002
    Posts
    104
    Originally posted by mfkow
    all those code i put in a class file.. and i set it everytime i connect to the server. but the error is

    SET CHAINED command not allowed within multi-statement transaction.
    yes put this setAutoCommit in class only....

    i think u are setting it everytime in ur main program with Connection object.

    Pls try to put this autocommit in class

    --Pooja

  9. #9
    Join Date
    Jun 2003
    Posts
    13
    a very wierd thing to tell u...

    i wanna see the log file mess for all the database connection message... so i put in some line to view the message.. then compile the class then run it again... n guess what.. everything look fine now...

    anyway.. thanks a lot..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •