<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Database APIs which can return a value telling that that the database is locked - Comments</title>
 <link>http://www.newlc.com/en/forum/apis-which-can-return-value-telling-database-locked</link>
 <description>Comments for &quot;Database APIs which can return a value telling that that the database is locked&quot;</description>
 <language>en</language>
<item>
 <title>Re: Database APIs which can return a value telling that that the</title>
 <link>http://www.newlc.com/en/forum/apis-which-can-return-value-telling-database-locked#comment-41468</link>
 <description>&lt;p&gt;&lt;br /&gt;
Yes, InTransaction() does return boolean which means that it just tells whether the database in transaction or not.&lt;/p&gt;

&lt;p&gt;So from this, you can make sure that whenever you are doing any update/delete/insert operation, you should always start an explicit transaction using Begin().&lt;br /&gt;
Then whenever you check  InTransaction() for another simultaneous database operation, you are sure that currently database is locked since you have begun an explicit transaction somewhere else in your application.&lt;/p&gt;

&lt;p&gt;So InTransaction() returning ETrue implies that database is locked.&lt;/p&gt;

&lt;p&gt;And also as i earlier mentioned, TRAPping the database update APIs will also give you KErrLocked error.&lt;/p&gt;</description>
 <pubDate>Fri, 14 Sep 2007 09:42:15 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41468 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Database APIs which can return a value telling that that the</title>
 <link>http://www.newlc.com/en/forum/apis-which-can-return-value-telling-database-locked#comment-41467</link>
 <description>&lt;p&gt;Hi,&lt;br /&gt;
Thanks for the information. So basically if I am using SQLs to manipulate with the database then &lt;span style=&quot;font-weight:bold&quot;&gt;Execute() &lt;/span&gt;returns KErrLocked and &lt;span style=&quot;font-weight:bold&quot;&gt;Begin() &lt;/span&gt;in case of Transaction. &lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;InTransaction()&lt;/span&gt; returns boolean which means that it just tells whether the database in transaction or not. &lt;/p&gt;

&lt;p&gt;Regards,&lt;br /&gt;
Sumit&lt;/p&gt;</description>
 <pubDate>Fri, 14 Sep 2007 08:02:02 +0200</pubDate>
 <dc:creator>sumitskj</dc:creator>
 <guid isPermaLink="false">comment 41467 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Database APIs which can return a value telling that that the</title>
 <link>http://www.newlc.com/en/forum/apis-which-can-return-value-telling-database-locked#comment-41430</link>
 <description>&lt;p&gt;Hi Sumit,&lt;/p&gt;

&lt;p&gt;The other database APIs that let you know if database is locked is &lt;span style=&quot;font-weight:bold&quot;&gt;InTransaction() &lt;/span&gt;. You can check out the documentation for this API in the Class RDbDatabase.&lt;/p&gt;

&lt;p&gt;Also on performing any other database operation like update/delete using UpdateL() or DeleteL(),  if the operation is enclosed withing a TRAP harness, you will get a KErrLocked error.&lt;/p&gt;

&lt;p&gt;Further, if you perform such an update or delete operation using a view and execute an SQL query in the database using &lt;span style=&quot;font-weight:bold&quot;&gt;Execute()&lt;/span&gt; function of Class RDbDatabase, it will return KErrLocked error if the database is locked.&lt;/p&gt;

&lt;p&gt;Hope this helps.. &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt; &lt;/p&gt;</description>
 <pubDate>Thu, 13 Sep 2007 08:27:12 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41430 at http://www.newlc.com</guid>
</item>
<item>
 <title>Database APIs which can return a value telling that that the database is locked</title>
 <link>http://www.newlc.com/en/forum/apis-which-can-return-value-telling-database-locked</link>
 <description>&lt;p&gt;Hi,&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/forum/apis-which-can-return-value-telling-database-locked&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/forum/apis-which-can-return-value-telling-database-locked#comments</comments>
 <category domain="http://www.newlc.com/en/forums/symbian-c">Symbian C++</category>
 <pubDate>Wed, 05 Sep 2007 08:35:30 +0200</pubDate>
 <dc:creator>sumitskj</dc:creator>
 <guid isPermaLink="false">18864 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
