I download the sample code DBUtils
and I don't know How to use the DBUtils.CopyDBFromAssets
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
tttt=dbutils.CopyDBFromAssets("\1.db")
SQL.Initialize (File.DirRootExternal, tttt, True)
'SQL.Initialize(File.DirRootExternal, "1.db", True)
End If
.........................................................
how to find the 1.db files,who can tell me how to use the CopyDBFromAssets
the code
If FirstTime Then
tttt=dbutils.CopyDBFromAssets("\1.db")
SQL.Initialize (File.DirRootExternal, tttt, True)
run in error "java.io fileNoFoundException:\1.db
I Don't know how to use the DBUtils.CopyDBFromAssets
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
tttt=dbutils.CopyDBFromAssets("\1.db")
SQL.Initialize (File.DirRootExternal, tttt, True)
'SQL.Initialize(File.DirRootExternal, "1.db", True)
End If
Activity.LoadLayout("1")
how to find the 1.db files,who can tell me how to use the CopyDBFromAssets
the code
If FirstTime Then
tttt=dbutils.CopyDBFromAssets("\1.db")
SQL.Initialize (File.DirRootExternal, tttt, True)
run in error "java.io fileNoFoundException:\1.db
Please be more patient. This is a community of users who are helping each other. "Bumping" your question two times in several hours will just cause users to ignore your questions.
DbUtils.CopyDBFromAssets return the folder which the file was saved in. It can be other than RootExternal as a storage card might not be available.
Sorry,erel,I'm very worry about use the datebase, so I post several times
.
but I can't understand the method
.
I want the programe run frist time builds a database, and store it in the phone, next time the programe runs if the database already, the programe will use it and not rebuilds, if not , the programe builds it again.