Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete a record based on a cursor
Message
From
25/06/2002 15:28:58
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Delete a record based on a cursor
Miscellaneous
Thread ID:
00672147
Message ID:
00672147
Views:
45
Hi All:

This is what I am trying to do.

I select all records from a TableA into a cursor; assign each field to a control on FormA (as in mLastName = curTableA.LastName); and then have navigation buttons on the form for users to go which ever direction they wish to.

FormA has other command buttons such as Add, Delete, Edit, Find, Save Changes and Return. Everything works OK, except for Delete. I am using SQL statements for Add, Updates and Delete. Yet I seem to be running into problems with Deleting a record. The next para has more on this.

The Find command button click event on FormA, brings up FormB to allow the user to type in the name they wish to find. The results of the search are displayed in a grid on FormB. The user then selects the name by click on a row in the grid; and then clicks Return,which brings the user back to FormA which is now populated with details for the selected name.

At this point which I click the Delete command button which has the following code:
delete from TableA where TableA.IDNumber = mIDNumber
This statment is followed by a select statement that repopulates the cursor and the fields.

PROBLEM: When I do a find again for the same record, it shows up in FormB. I know I am not understanding the process well as far as Deletes are concerned. Your guidance is much appreciated. Thanks.
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Next
Reply
Map
View

Click here to load this message in the networking platform