Database Error : Compiling app on iphone device
<p>I am getting a problem when i compile my iphone database application to device.
When i debug the code it says database path "out of scope" on the break point and it does not compile the statement. Below is the code i am using to access the database.</p>

<pre><code>databaseName = @"Zen.sqlite";
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [documentPaths objectAtIndex:0];
databasePath = [documentsDir stringByAppendingPathComponent:databaseName];
</code></pre>

<p>It works perfectly fine when i use the same code on simulator. Please help me to get this work on iphone device as well.
Thanks.  </p>
