c# - SQLITE - INSERT does not return error but no data is inserted -
I am trying to insert data from a C # application into a local SQLite database file. Transaction does not make any errors, but data is not included. The same entry statement works from within the query analyzer.
Do I need to commit one? Is there any committee method?
The command transaction property is zero.
var command = new SQLITMand (Enter.BildInstate (table name, key value pair), connection); Command.ExecuteNonQuery ();
Update:
I have also tried to know my SQLiteCommand with a SQLiteTransaction but there is no luck.
try {SQLiteTransaction} Light Transactions = Connection. Bestunction (); SQLiteCommand command = New SQLiteCommand (insert.BuildInsert (tagname, key valuepayer), connection); order. Transaction = Light Transaction; Command.ExecuteNonQuery (); LiteTransaction.Commit (); } Hold (SQLiteException E) {// Error connection. Stop it (); }
The Buildint method creates only one string that is INSERT. The insert works fine in a query analyzer.
This is an example of an INSERT statement. It works well outside the code but does not make any errors:
TestData in INSTERT (Walking, Walking, Image, Yoga, Exercise, Meditation, Hobbies, Some, "True", "True", "deepbreathing", "deepbreathing"); COMMIT; "true", "truth", "when i am", "1", "true", "emphasis");
DOSH! Because the local database build operation was set to 'always coop', I have multiple versions of the same file.
Sorry for this it's lame .
Comments
Post a Comment