SQL DB Copy From DirAssets problem

petri2000

Member
Licensed User
Longtime User
Maybe I just missed something trivial...

I am having a SQL Lite DB in the files directory and want to copy it to the DirInternal (to obviously get R/W access to it) but I get the following message: java.io.FileNotFoundException: oasisdrd.db3

It works not either under the AVD or on 3 devices I tested on (HTC Desire, ZTE Blade & Motorola)

I am using the following code:

If File.Exists(File.DirInternal,"OASISdrd.db3") = False Then
File.Copy(File.DirAssets,"OASISdrd.db3",File.DirInternal,"OASISdrd.db3")
End If

If SQL1.IsInitialized = False Then
SQL1.Initialize(File.DirInternal, "OASISdrd.db3", False)
End If



I have gone through all tutorials, samples, forum etc but have not managed to solve this. Please help me!

I have attached a sample project to illustrate the problem.

I Love B4A But I am stuck....

Cheers,

Petri
 

petri2000

Member
Licensed User
Longtime User
A million Thanks HELEN!!!!
You saved my day! I wish I had a big bunch of flowers to send to you!

Thanks again for the help! Wierd though that you cannot have capital letters in this case...

Cheers,

Petri :wav:
 
Upvote 0
Top