Android Question Insert data into sqlite database table

gmustafa

New Member
Licensed User
Longtime User
I can count rows form table but can't save data

IfFile.Exists(File.DirDefaultExternal,"HDSS.db")=FalseThen

File.Copy(File.DirAssets,"HDSS.db",File.DirRootExternal,"HDSS.db")

EndIf

SQL1.Initialize(File.DirRootExternal,"HDSS.db",True)


SQL1.ExecNonQuery("INSERT INTO BIRTH (UNIT,SEQ_NO,SRNO,REP_VILL)

VALUES

('"& unittxt.Text &"','"& pcnotxt.Text &"','"&slnotxt.Text&"','"&repvilltxt.Text&"')")


Msgbox("Birth Record Saved ","")
 

klaus

Expert
Licensed User
Longtime User
The folder in the Files Tab is the Assets folder.
You cannot acces a database in this folder, that's the reason why you need to copy it somewhere else.
To see a change you could either read the database back in your application or access the database from the device via a USB connection.
 
Upvote 0

Aldy009

Member
The folder in the Files Tab is the Assets folder.
You cannot acces a database in this folder, that's the reason why you need to copy it somewhere else.
To see a change you could either read the database back in your application or access the database from the device via a USB connection.
Yes, thank you Klaus. Just realized it now. Still an Android newbie. :)
 
Upvote 0
Top