Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User yigalbeer's Avatar
    Join Date
    Nov 2005
    Posts
    11
    I'm using a shared database (by using RDbNamedDatabase) that can be accessed for read and/or write from multiple threads. I looked over the documentation about using shared database with DBMS, but something is still missing to me to fully understand it: while it's possible to gain a read lock (by RDbDatabase::Begin()), the write-lock is gained automatically and if one (or more) of the clients have read-lock, the write operation is failed. My questions are:
    1. How can I check in advance whether the database is read-locked? do I have to wait to a failure?
    2. Is there a way to wait for all the read-locks to be released, or it should be implemented by the application logic.

    Any insight about the best way to handle this correctly will be appreciated :-)

    Thanks, Yigal

  2. #2
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    As far as I know there is no support for locking on Symbian Databases

  3. #3
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    According to the SDK Help, RDbDatabase::InTransaction might be an answer to (1).

  4. #4
    Regular Contributor rihoe's Avatar
    Join Date
    Jan 2005
    Location
    Estonia
    Posts
    350
    My experience shows that no matter wat you do, sometimes 2 programs can still simultaneously open transaction to the same database and the just sit there, hanged (no panics, no returning with error)

Similar Threads

  1. Replies: 4
    Last Post: 2009-12-19, 15:35
  2. database trouble
    By liafail in forum Symbian C++
    Replies: 6
    Last Post: 2005-12-28, 05:56
  3. InsertL in database Controls the DB
    By Blkangel in forum Symbian C++
    Replies: 5
    Last Post: 2004-01-13, 15:02
  4. Replies: 1
    Last Post: 2003-12-19, 19:48
  5. database problem
    By sridhar_ratna in forum Symbian C++
    Replies: 1
    Last Post: 2003-04-18, 09:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved