UPDATE Statements
To update a table, use the standard UPDATE SQL syntax. The RSSBus ADO.NET Provider for Google Spreadsheets supports updating only one row at a time. Hence the primary key Id is always required.
C#
String connectionString = "user=myuseraccount;password=mypassword;Offline=false;";
using (GoogleSheetsConnection connection = new GoogleSheetsConnection(connectionString)) {
GoogleSheetsCommand cmd = new GoogleSheetsCommand("UPDATE MySpreadsheet SET Column1='John Smith' WHERE Id = @myid", connection);
GoogleSheetsCommand.Parameters.Add(new GoogleSheetsParameter("myid","https://spreadsheets.google.com..."));
cmd.ExecuteNonQuery();
}
VB.NET
Dim connectionString As [String] = "user=myuseraccount;password=mypassword;Offline=false;"
Using connection As New GoogleSheetsConnection(connectionString)
Dim cmd As New GoogleSheetsCommand("UPDATE MySpreadsheet SET Column1='John Smith' WHERE Id = @myid", connection)
GoogleSheetsCommand.Parameters.Add(New GoogleSheetsParameter("myid", "https://spreadsheets.google.com..."))
cmd.ExecuteNonQuery()
End Using