How to delete data by clicking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AlfredNg86
    New Member
    • Sep 2007
    • 4

    How to delete data by clicking

    I'm using Visual Web Developer
    SQL as a database..
    Using VB code

    Is it possible to delete a data by selecting the data using the mouse and then click on a del button ?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    From where you want to select and delete ?

    kindle post your question bit crearly.

    Comment

    • AlfredNg86
      New Member
      • Sep 2007
      • 4

      #3
      Sorry...

      I linked my SQL database to VWD. After design the web page from VWD and "bulid page" from VWD it will display a list of data from the SQL in the web browser. I need to able to delete the data in the web browser by using mouse to select the data and then delete it.

      Sorry if I'm still not clear

      Comment

      • hariharanmca
        Top Contributor
        • Dec 2006
        • 1977

        #4
        Originally posted by AlfredNg86
        Sorry...

        I linked my SQL database to VWD. After design the web page from VWD and "bulid page" from VWD it will display a list of data from the SQL in the web browser. I need to able to delete the data in the web browser by using mouse to select the data and then delete it.

        Sorry if I'm still not clear
        If you have time, just post your problem in point by point with the code you had tryed.

        [CODE=vb]Dim strSql as String

        strSql="Delete from tblTableName where fldSelectField = " & selecteddata[/CODE]
        execute this query in oledb connection.

        Comment

        • QVeen72
          Recognized Expert Top Contributor
          • Oct 2006
          • 1445

          #5
          Hi,

          When u Select a Row from the VWD, u will be knowing the PK or any distinct field of that Table, and use "Delete" SQL Statement to delete the Record and Refresh the webpage..


          REgards
          Veena

          Comment

          Working...