I have a problem with a table not updating.
Background...
At first I was running two separate DB3's
I read/wrote to each one separately perfectly fine.
Each DB had its own conn, which I close after each use
I imported (CSV) one table to the 1st DB. Same table name, fields etc
Same code, except the path to 2nd DB was changed to path of 1st DB
But now, when I try to update the to the added table, it doesn't update.
I get no errors of any kind.
Debugged, and the sql string I am passing is perfectly fine.
Here is my updating code:
It may be that the DB is still opened, but I am sure I close it when loading it with....
How can I make sure the DB is closed completely??
Or is something else wrong?
Thanks
Background...
At first I was running two separate DB3's
I read/wrote to each one separately perfectly fine.
Each DB had its own conn, which I close after each use
I imported (CSV) one table to the 1st DB. Same table name, fields etc
Same code, except the path to 2nd DB was changed to path of 1st DB
But now, when I try to update the to the added table, it doesn't update.
I get no errors of any kind.
Debugged, and the sql string I am passing is perfectly fine.
Code:
"UPDATE accountsmms SET id='1',Date='06-07-2020',Account='AllocatedinCHK',Type='Income',Category='Expense',Item='Misc Cash',Budget = '0.00',Balance='0.00' WHERE id=1"
Code:
Dim filePath = lbStatus.Text
Using connection As New SQLite.SQLiteConnection("Data Source=" & filePath & "")
Dim cmd As New SQLiteCommand(sql, connection)
cmd.Connection = connection
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
connection.Open()
cmd.ExecuteNonQuery()
cmd.Dispose()
connection.Close()
End Using
Code:
connection.Close()
da.Dispose()
Or is something else wrong?
Thanks