topical media & game development

talk show tell print

basic-mysql-19-ASPApp-delete.aspx / aspx



  <%
  
***************************************************************************** Author: Geoff Moes and Robert Sheldon Project: Begining MySQL - Chapter 19 Module: delete.aspx Date: 12/10/04 Description: Include file that contains the delete for the insert functionality. *****************************************************************************

  
  %>
  
  <%
  // Build the DELETE statement with a transactionId parameter reference
  String deleteSQL = "DELETE FROM Transactions WHERE TransID = ?";
  
  odbcCommand = new OdbcCommand(deleteSQL, odbcConnection);
  
  // Set the TransID parameter
  OdbcParameter odbcParameter = new OdbcParameter("", OdbcType.Int);
  odbcParameter.Value = transactionId;
  odbcCommand.Parameters.Add(odbcParameter);
  
  // Execute the DELETE statement
  odbcCommand.ExecuteNonQuery();
  
  if(odbcCommand != null)
     odbcCommand.Dispose();
  %>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.