C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » ASP.NET WebForms »

Delete Record with SQL statement


Posted Date: 28 Nov 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms
Author: Pradeep IyerMember Level: Diamond    
Rating: 1 out of 5Points: 10



SQL statements can be used to delete data.

The following code describes how to do this:

ASP page
***********

PROVIDED AS AN ATTACHMENT


The Error trapping library looks like this:



Sub ErrorVBScriptReport(parm_msg)
If Err.number=0 Then
Exit Sub
End If
pad=" "
Response.Write "VBScript Errors Occured!
"
Response.Write parm_msg & "

"
Response.Write pad & "Error Number= #" & Err.number & "
"
Response.Write pad & "Error Desc.= " & Err.description & "
"
Response.Write pad & "Help Context= " & Err.helpcontext & "
"
Response.Write pad & "Help File Path=" & Err.helpfile & "
"
Response.Write pad & "Error Source= " & Err.source & "

"
End Sub

Sub ErrorADOReport(parm_msg,parm_conn)
HowManyErrs=parm_conn.errors.count
If HowManyErrs=0 Then
Exit Sub
End If
pad=" "
Response.Write "ADO Reports these Database Error(s) executing:
"
Response.Write SQLstmt & "

"
For counter= 0 To HowManyErrs-1
errornum=parm_conn.errors(counter).number
errordesc=parm_conn.errors(counter).description
Response.Write pad & "Error#=" & errornum & "
"
Response.Write pad & "Error description="
Response.Write errordesc & "

"
Next
End Sub



Attachments

  • dbdeletemany.asp (23142-28347-dbdeletemany_asp.txt)



  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    Delete Record with SQL statement  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: MultiColor DropDownList using javascript
    Previous Resource: Embedded video to our webpage
    Return to Discussion Resource Index
    Post New Resource
    Category: ASP.NET WebForms


    Post resources and earn money!
     
    Related Resources



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use