The line that throws the error is this one
x=0
I have tried different configurations but no luck
Code=WDSales.tblProducts.SelectCell("Code",x)
this is the full code snippet
WDSales.tblProducts.LoadCSV ("CeProducts.csv", ",", True, True)
For x = 0 To WDSales.tblProducts.RowCount
Code=WDSales.tblProducts.SelectCell("Code",x)
Cmd.CommandText="DELETE FROM Products WHERE Code='" & Code & "'"
Cmd.ExecuteNonQuery
cmd.CommandText = "INSERT INTO Products SELECT Code,SupplierCode,BinLoc,Description,QtyInStock from TempTable"
cmd.ExecuteNonQuery
Next
I am suspecting that it is because the table is being defined only by the LoadCSV command but that csv file does have a field called code in it.
Is it necessary to define the whole table first?
I wrote a program for a mobile device with GPS, which updates a database.
My customer has recently got another device, so now I have two databases, and need to merge the updates.
I have written a (desktop) program which uses 2 connections, commands and reader objects so that I can find records in one database which are newer than the 'master' database. I'm assembling an 'Update' SQL command, using parameters, but the Conn1.EndTransaction causes this error:
"SQLite error
cannot commit transaction - SQL statements in progress"
At first I wondered if there were too many fields/values [34], so I commented some of it out, but still get the error. I'd had a few SQL errors, causing the program to abort, so I wondered if the 'BeginTransaction' had left the database in an odd state, but I can update it with my original program, and also using 'Sqliteman'.
I've commented out the 'BeginTransaction' and 'EndTransaction', and it has successfully updated one record. (not tried all fields yet; still commented out)
I've fixed it.. I had two Readers on the same connection; one to get the existing values, and one to do the update - and the first one wasn't closed when I did the update.
Since yesterday I have got a strange message while using HTTP library:
Code:
Response code: - 1 NameResolutionFailure
Before it worked fine.
Strange is that even neither Internet Explorer nor Opera browser do not work any more.
Connection via Network library works fine though.
Soft reset has no effect. I did not change any registry. Any idea?