#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    8
    Rep Power
    0

    Question Database restart required : Tries to update the database using C# .NET application


    Hello

    I am trying to update the FireBird database from C# .NET application. Updation of database from .NET is working fine. But once we do SELECT * FROM <table-name> on FireBird database command prompt then it will not display the recently added records. So for updated display we have to quit the FireBird database and re-login.

    So please help me.

    regards
    Shibu Mathew
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,788
    Rep Power
    349
    Sounds like in the commandline you are running in REAPEATABLE READ isolation level (I think it's called SNAPSHOT in Firebird).

    Try to issue a COMMIT (or ROLLBACK) from isql in order to end your current transaction there. Then you should see the updated rows.

    As an alternative you might want to change the isolation level from within isql.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    8
    Rep Power
    0

    Hello shammat


    Thanks a lot. It's working fine.

    I have one small doubt, I did an Transaction commit on C# .NET. Is it not enough to show the updates on isql? Why again we are giving commit on isql?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,788
    Rep Power
    349
    Originally Posted by shibumathew
    Why again we are giving commit on isql?
    Because you need to end the transaction in isql

    The default isolation level is "SNAPSHOT" also known as "REPEATABLE READ". In this level your transaction sees a consistent state of the database as long as the transaction is open. It will not see any changes from other transactions.

    So you either need to end your transaction or change the isolation level to "READ COMITTED".
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    8
    Rep Power
    0

    Thanks Shammat


    Thanks a lot. Now it's working perfect.

IMN logo majestic logo threadwatch logo seochat tools logo