UPDATE Statements
To update a table, use the standard UPDATE SQL syntax. The provider supports updating only one row at a time. Hence, the primary key IId is always required.
C#
String connectionString = "Account Id=XABC123456;Password=password;User=user;Role Id=3;Version=2013_1;Location=C:\\myfolder\\;Offline=false;";
using (NetSuiteConnection connection = new NetSuiteConnection(connectionString)) {
NetSuiteCommand cmd = new NetSuiteCommand("UPDATE Account SET AcctName='Petty Cash' WHERE Id = @myId", connection);
cmd.Parameters.Add(new NetSuiteParameter("myId","1"));
cmd.ExecuteNonQuery();
}
VB.NET
Dim connectionString As [String] = "Account Id=XABC123456;Password=password;User=user;Role Id=3;Version=2013_1;Location=C:\\myfolder\\;Offline=false;"
Using connection As New NetSuiteConnection(connectionString)
Dim cmd As New NetSuiteCommand("UPDATE Account SET AcctName='Petty Cash' WHERE Id = @myId", connection)
cmd.Parameters.Add(New NetSuiteParameter("myId", "1"))
cmd.ExecuteNonQuery()
End Using