Hi All,
Can anyone tell me where the database goes. Any answer will be welcome.
I used code from scrollviewlist to read a csv file and write it to table1. This works perfectly except I can't find the table to copy it so a safe place for reuse. My csv file is over 200,000 records and record are added to the table per each use, so I need the table when the app closes.
I have searched for how to create the table in another place but I didn't see anything relating to that. I looked for copying the database but could not identify anything that would do it.
This is all I need and my app can go to market. I made this app for my brotherinlaw who is crippled on the right side of his body. This app addresses his handicap. He is my market.
Thank you for reading, don't be shy please reply,
Mike :BangHead:
'Dim cursora As Cursor
'cursora.IsInitialized
'cursora = SQL1.ExecQuery("Select name from sqlite_master 'WHERE Type= 'table' ORDER BY name;")
'cursora.Position = 0
'Msgbox(cursora.GetString("name"), "table:")
This code find the table but does not tell me where it is.======
Sub SQLCreateTable
SQL1.ExecNonQuery("DROP TABLE IF EXISTS table1")
SQL1.ExecNonQuery("CREATE TABLE table1 (Code TEXT , First TEXT, Name TEXT)")
SQLFillTable
this works=============================
Sub SQLFillTable
' Fills a SQL data base
Dim i As Int
Dim tr As TextReader
tr.Initialize(File.OpenInput(File.DirAssets, "myfile1.csv"))
SQL1.BeginTransaction
Dim InputStream1 As InputStream
line = tr.ReadLine
line = tr.ReadLine
Try
Do While line <> Null
this works =============
plus code that adds records to the database such as
Sub curswrite
' SQL1.BeginTransaction moved to another more optomize spot.
Dim LineArray() As String
LineArray = Regex.Split(",", line)
Dim lwl As Int
lwl = LineArray.Length
If lwl > 1 Then ' this to catch null record at end of file.
SQL1.ExecNonQuery2("INSERT INTO table1 VALUES(?, ?, ?)", Array As Object(LineArray(0), LineArray(1), LineArray(2)))
Else
lwl = lwl
End If