If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > delete the record i want

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-25-04, 21:46
ONIL ONIL is offline
Registered User
 
Join Date: Feb 2004
Posts: 14
solved:delete the record i want by using seek

hi

i am using vb6 and access. i have a form in which there is a adodc, a datalist OR a datagrid to view the contents of a table in an access file. i want to delete a particular record by selecting the row (in a datagrid) OR selecting the record in a datalist. how do i achieve this? pl help

onil

Last edited by ONIL; 05-26-04 at 10:42. Reason: solved
Reply With Quote
  #2 (permalink)  
Old 05-25-04, 23:07
derrickleggett derrickleggett is offline
Registered User
 
Join Date: Apr 2004
Location: Kansas City, MO
Posts: 734
Have the on_click action call a stored procedure to delete the record. Just pass the record id to the stored procedure and let it do the delete. You'll then want to refresh the dataset and control.
__________________
MeanOldDBA
derrickleggett@hotmail.com
When life gives you a lemon, fire the DBA.
Reply With Quote
  #3 (permalink)  
Old 05-25-04, 23:55
ONIL ONIL is offline
Registered User
 
Join Date: Feb 2004
Posts: 14
on_click action call

hi

i tried but it always deletes (in both cases -datagrid and datalist) the first record BUT NOT the record i click on

onil
Reply With Quote
  #4 (permalink)  
Old 05-28-04, 04:29
ivon ivon is offline
Registered User
 
Join Date: Nov 2002
Posts: 272
ONIL,
you may want to post your question in the Delphi, Visual Basic, C etc forum. It looks like your problem is VB related, not SQL. What you want to know is how to find out which line of the datagrid was clicked.
Reply With Quote
  #5 (permalink)  
Old 05-28-04, 07:15
ONIL ONIL is offline
Registered User
 
Join Date: Feb 2004
Posts: 14
issue resolved

hi

thanks for the interest. i have solved the issue using the seek command

onil
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On