SQLite Locked when not in Debug

lip

Active Member
Licensed User
Longtime User
A have been developing an application aimed at Asus Transformer using SQLite database. When compliing with Debug all is well. However, if I select Release mode as soon as the database trys to initialise I get the message Cannor Open the Database in Read/Write mode.

I have written a new test app which does nothing apart from initialise the database. This app also works in Debug but not in Release.

Sub Activity_Create(FirstTime As Boolean)
Dim WiE3SQL As SQL ' This in Process_Globals in the main app
WiE3SQL.Initialize("/sdcard/","WiE3SQLTest",True)
WiE3SQL.ExecNonQuery("DROP TABLE IF EXISTS Device")
End Sub

I have also tried changing the file name of the database - same result.

A assume that it is a problem with the Asus so I have done Soft Reset but no change.

Any ideas?
 

lip

Active Member
Licensed User
Longtime User
SQLite Locked

Sure you don't have your device in file-trasfer mode?

No I'm not sure what this means - could it be put in this mode by using Debug? I am using B4A Bridge via Wireless router if that helps...
 
Upvote 0

lip

Active Member
Licensed User
Longtime User
SQL Problem

No I'm not sure what this means - could it be put in this mode by using Debug? I am using B4A Bridge via Wireless router if that helps...

Really need some help here!

I've tried the code on another PC sending it to the same Asus device and it works fine (cost me another $49 to get it running with SQL Library!).

It's somthing with my PC which i've now rebooted four times.

SQL databases simply won't work from my Laptop unless in Debug mode. It has worked fine for the last month.

Shall I uninstall B4A and install again? Has anyone else had to do this?
 
Upvote 0

lip

Active Member
Licensed User
Longtime User
I have an Asus TF700 and use databases.
But I use File.DirInternal or File.DirRootExternal instead of "/sdcard/" without any problem in both methods Debug and Release..

Best regards.

Thanks, I will try that but it's jot the code. I have several projects, all using SQL commands, all of which have been working until today. Now none of them will.

The IT bods at work have changed our servers and so had my laptop and linked it to a new domain. I think this may have caused the problem. B4A stopped working and I had to re-find the license file and reset the paths. It could be a coincidence...Another thing that changed is that I downloaded a library called TouchImageView. Could I have screwed the IDE in the process?
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
using the bridge? then I have to suppose you don't have your device connected at the usb port. if so, do you have any other program connected wirelessly with your device?
 
Upvote 0

lip

Active Member
Licensed User
Longtime User
SQL Locked - Solved

Thanks Erel - problem solved.

I guess I either changed the device somehow or added some code that meant that permission was being denied.

Using File.DirInternal also solved the problem but I could not understand why. Now I know.

David
 
Upvote 0
Top