SQLite Update Problem

david

Member
Licensed User
Hi Erel,

I am having difficulty getting any sql updates to work.:sign0085:

Please see the following code:


Sub btnInsert_Click
' Temporary Code To Check Database Inserts or Updates (Depending On What has been commented out). This is only test code!

' Command.CommandText = "Insert Into LogNumber(Lognum, Descrip) Values('" & txtLogNum.Text &"', '" & txtLocation.Text & "')"

' Command.CommandText = "Insert Into LogNumber(Lognum, Descrip) Values( 'Test Number', 'Test Description' )"

Command.CommandText "Update LogNumber Set Descrip = 'New Description'"

Command.ExecuteNonQuery
End Sub

The lines that have been commented out work fine when they are compiled in.

That is I can insert records through variables or actual strings.

I cannot update successfully whether or not I use variables or strings or a "Where" condition.

It does work at the prompt with sqlite3 in a windows command window, so it is not a database issue?

Am I doing something wrong?

Also can you point me to code that tells me how to capture sql database exceptions and provide the appropriate error messages.

Thank you very much.

Regards,

David
 
Top