If File.Exists(File.DirInternal, "gulf.db") = False Then
ProgressDialogShow("New User Found, Importing Data, Please Wait........")
Sql2.Initialize(File.DirInternal, "gulf.db", True)
'and create it
CreateDataBase
Hey Juzer, IF :
If File.Exists(File.DirInternal, "gulf.db") = False
That's mean that NOT exists "gulf.db" and you CAN'T "Sql2.Initialize(File.DirInternal, "gulf.db", True)" because "gulf.db" does not exists.
I "figure" what you want to do... You can try:
- Include in your project a "gulf.jpg"
- If File.Exists(File.DirInternal, "gulf.db") = False THEN Copy "gulf.jpg" to "gulf.db"
It shows "New user found......" waits for few seconds but does not copy data from server.
DB is empty.
It is downloading data in emulator.Is there any consideration in mobile Device like permission to be set etc.
Its ok now. Actually HttpJob takes time finishing and while it is still running program execution moves to next statement.Later when HttpJob has finished code will execute again from next statement onwards.I removed functions which called HttpJob(DownLoadData) and put them sequentially in main function it solved the problem.