×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Question How to close database opened with openDatabaseSync ?

    Hello.

    I'm populating a list view's model from a JavaScript function in QML by reading a database. The database is being opened using the openDatabaseSync function, and everything seems to be working fine, but I am not closing it, and I'm a little concerned about that.

    I have searched the web and the forums looking for the appropriate way to close databases that were opened with this function, but I don't seem to find any answer.

    Even the Offline Storage API documentation doesn't mention anything related to closing the databases, and all QML examples I have seen don't close the database after using it.

    Do you know if there is a need to explicitly close databases opened with openDatabaseSync ?
    If not, when are they closed ? If yes, how ?

    Any comments or answers really appreciated.

    Thanks.

    p.d. I have noticed that this forum (Qt Quick) don't get much participation. Why is that ?
    -CarlosDL

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    1

    Smile Re: How to close database opened with openDatabaseSync ?

    Quote Originally Posted by cadlg View Post
    Hello.

    I'm populating a list view's model from a JavaScript function in QML by reading a database. The database is being opened using the openDatabaseSync function, and everything seems to be working fine, but I am not closing it, and I'm a little concerned about that.

    I have searched the web and the forums looking for the appropriate way to close databases that were opened with this function, but I don't seem to find any answer.

    Even the Offline Storage API documentation doesn't mention anything related to closing the databases, and all QML examples I have seen don't close the database after using it.

    Do you know if there is a need to explicitly close databases opened with openDatabaseSync ?
    If not, when are they closed ? If yes, how ?

    Any comments or answers really appreciated.

    Thanks.

    p.d. I have noticed that this forum (Qt Quick) don't get much participation. Why is that ?

    Hi ,

    You need not have to worry about closing the database, AFAIK , it gets closed, when the variable goes out of scope.
    Hope this helps

  3. #3
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: How to close database opened with openDatabaseSync ?

    Quote Originally Posted by anwarkhan_a View Post
    Hi ,

    You need not have to worry about closing the database, AFAIK , it gets closed, when the variable goes out of scope.
    Hope this helps
    Thanks anwarkhan_a, that was my suspicion, but I wasn't able to confirm it (didn't find any official documentation related to this).
    -CarlosDL

Similar Threads

  1. Replies: 1
    Last Post: 2010-12-17, 04:08
  2. How to communicate with a web database to read/write data from/to database.
    By kuddy_abc in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2009-08-08, 20:45
  3. Replies: 4
    Last Post: 2009-05-14, 09:30
  4. Replies: 3
    Last Post: 2008-10-24, 15:19
  5. Replies: 3
    Last Post: 2008-02-25, 12:47

Posting Permissions

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