Deletion statement

Results 1 to 2 of 2

Thread: Deletion statement

  1. #1
    Join Date
    Dec 1969

    Default Deletion statement

    &nbsp;<BR>I am running a SQL deletion statement that is looping in multiple databases. It intakes a value from a form, searches for that value in each database, then then deletes it if found. Problem is that it doesn&#039;t confirm if the record was found and deleted. Anyway to do it with this code? Thanks<BR><BR>dbNames = Array( "*,*" ) <BR><BR>Set objConn=Server.CreateObject("ADODB.Connection") <BR><BR>For i = 0 to UBound(dbNames) <BR> strConn = "DBQ=" & Server.MapPath(dbNames(i)) & ";Driver={Microsoft Access Driver (*.mdb)};" <BR> strConn <BR> SQL = "DELETE FROM Email WHERE Email LIKE &#039;" & Request.Form("txtemail") & "&#039;"<BR> SQL1 = "DELETE FROM BuildingEmail WHERE Email LIKE &#039;" & Request.Form("txtemail") & "&#039;"<BR> objConn.Execute SQL<BR> objConn.Execute SQL1<BR> objConn.Close<BR>Next <BR><BR>Response.Redirect "***************?email=" + request.form("txtemail")

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default See what else the .Execute can do

    check the will tell you how many rows (if any) were affected.....<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts