Re: [sqlite] Updating multiple records in C#

2016-12-07 Thread Richard Andersen
Wednesday, December 7, 2016, 9:15:57 AM, you wrote: Thanks Ryan, this looks very useful, think I've got what I need now to make it work! Richard >> But how do I do this for multiple records and mutiple fields? I >> imagine I need to use SQLiteTransaction here but I'm not sure about >> the syntax

Re: [sqlite] Updating multiple records in C#

2016-12-07 Thread Richard Andersen
Wednesday, December 7, 2016, 3:12:05 AM, you wrote: >> On Dec 6, 2016, at 5:40 PM, Richard Andersen wrote: >> >> cmd.CommandText = @"UPDATE pdata SET FileName = @fileName WHERE FileName = >> 'filename.zip'"; > You can add other columns to set by adding more “name = value” > expressions in bet

Re: [sqlite] Updating multiple records in C#

2016-12-07 Thread R Smith
On 2016/12/07 3:40 AM, Richard Andersen wrote: I have a table with several thousand records each with multiple fields. One field contains a filename, this is the only unique field so I use it to identify the different records. What I need is a way to update all fields that have changed in any

Re: [sqlite] Updating multiple records in C#

2016-12-06 Thread Jens Alfke
> On Dec 6, 2016, at 5:40 PM, Richard Andersen wrote: > > cmd.CommandText = @"UPDATE pdata SET FileName = @fileName WHERE FileName = > 'filename.zip'"; You can add other columns to set by adding more “name = value” expressions in between SET and WHERE. Here’s the documentation of the UPDATE c

[sqlite] Updating multiple records in C#

2016-12-06 Thread Richard Andersen
I have a table with several thousand records each with multiple fields. One field contains a filename, this is the only unique field so I use it to identify the different records. What I need is a way to update all fields that have changed in any record, at once. There's no need to check IF a re