Integration Your Way - (800) 235-7250
RSSBus ADO.NET Provider for OData
Questions / Feedback? DELETE Statements

DELETE Statements

To delete from a table, use the standard DELETE SQL syntax. The RSSBus ADO.NET Provider for OData supports deleting only one row at a time. Hence the primary key Id is always required.

C#

  
  String connectionString = "user=myuseraccount;password=mypassword;URL=http://myserver/myOrgRoot;Offline=false;";
  using (ODataConnection connection = new ODataConnection(connectionString)) {
    ODataCommand cmd = new ODataCommand("DELETE FROM Lead WHERE Id = @myid", connection);
    ODataCommand.Parameters.Add(new ODataParameter("myid","1045625d-99ee-e011-a272-00155d01ad6b"));
    cmd.ExecuteNonQuery();
  }

VB.NET

  
  Dim connectionString As [String] = "user=myuseraccount;password=mypassword;URL=http://myserver/myOrgRoot;Offline=false;"
  Using connection As New ODataConnection(connectionString)
    Dim cmd As New ODataCommand("DELETE FROM Lead WHERE Id = @myid", connection)
    ODataCommand.Parameters.Add(New ODataParameter("myid", "1045625d-99ee-e011-a272-00155d01ad6b"))
    cmd.ExecuteNonQuery()
  End Using


 
Copyright © 2013 RSSBus Inc.
[x] close

Questions / Feedback?


Name:
Email:
Feedback:
Send Feedback