how to delete records

Reply

Join Date: Jul 2007
Posts: 24
Reputation: dmotah is an unknown quantity at this point 
Solved Threads: 0
dmotah dmotah is offline Offline
Newbie Poster

how to delete records

 
0
  #1
Aug 2nd, 2007
hi, im using msaccess as database. can u plz tel me how to delete records using vb (it should serch nad delete)
tkx
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 166
Reputation: AV Manoharan is an unknown quantity at this point 
Solved Threads: 9
AV Manoharan AV Manoharan is offline Offline
Junior Poster

Re: how to delete records

 
0
  #2
Aug 2nd, 2007
Originally Posted by dmotah View Post
hi, im using msaccess as database. can u plz tel me how to delete records using vb (it should serch nad delete)
tkx
If you can acceess a database and retrieve a particular table from it, definetely, you can search,insert rows,delete rows/the entire table,alter,update the whole things. Why ask? Just select the appropriate keyword and its syntax. Much things are in this forum. Just give a search for it.

Happy Programming

AV Manoharan
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,093
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 126
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: how to delete records

 
0
  #3
Aug 2nd, 2007
As suggested by Manoharan you can execute any command from VB . just use connection.execute with the sql u want to execute.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 10
Reputation: epok13hart is an unknown quantity at this point 
Solved Threads: 0
epok13hart epok13hart is offline Offline
Newbie Poster

Re: how to delete records

 
0
  #4
Aug 6th, 2007
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. private sub cmddelete_()
  2. adodc1.recordsource="select * from employee where id " & _
  3. "'" & txtid.text & "'"
  4. adodc1.refresh
  5.  
  6. dim a as integer
  7.  
  8. a=adodc1.recordset.recordcount
  9. if a=1 then
  10. msgbox"id found ",,"id number match"
  11. with adodc1.recordset
  12. .delete
  13. .update
  14. end with
  15. msgbox"record deleted",,"employee deleted"
  16. exit sub
  17.  
  18. end if
  19. msgbox"no id number match with ur request",,"no file found"
  20. end sub

im using access hope it will help you make sure properly link
put the code in the command button code for vb6.0
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC