NetSuite Data Provider - Online Help
NetSuite Data Provider
Questions / Feedback?

DELETE Statements

To delete from a table, use the standard DELETE SQL syntax. The provider supports deleting only one row at a time. Hence, the primary key, Id, 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("DELETE FROM Account WHERE Id = @myId", connection);
  cmd.Parameters.Add(new NetSuiteParameter("myKeyName;","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("DELETE FROM Account WHERE Id = @myId", connection)
  cmd.Parameters.Add(New NetSuiteParameter("myId", "1"))
  cmd.ExecuteNonQuery()
End Using

 
 
Copyright (c) 2015 RSSBus, Inc. - All rights reserved.
Build 1.0.5578.0