Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting from a form

Status
Not open for further replies.

Bensta

Programmer
Jul 21, 2003
122
US
I am working with an ADP files. I have a continuous forms that is bond to a stored procedure. My problem is that I can detete records as it is possible with access. In access you could delete individual records on continuious forms
Any ideas please
Thanks
 
Hi, why the need for the stored procedure? you could use a function to do this, which would make the recordset updatable.
 
In this particular situation, the continuous form is used primarly for viewing records. Also there is a filter set on the form if I went to view info related to a particular record. However, sometimes I may want to delete some records. In access I was able to delete records on a continuous forms that were bond to a query. This functionality does not seem to be available in ADP files.
As far as using functions versus stored procedure, wouldn't you be better off, from a performance point of view,using a stored procedure instead?
And one last question, can I delete or update records based on views or stored procedures? IS it possible to do so using views, or am I better off using stored procedures to complete this task?
Thank you
Bensta
 
Yes you can add/update/delete records based on views and stored procedures (as long as they are updateable).

To start with check your form properties:

Recordset Type: Updateable Snapshot
Allow Edits: No
Allow Deletions: Yes
Allow Addiotions: No

If your Stored Procedure uses more than more table you may need to set the Unique Table property also.

Yes stored Procedure is the best method here

Robert
 
I am using a view, which is joining several tables. I did change the settings on the form, but it still does not work. I could not find the set the unique table property.
Thank you in advance
 
Sorry Unique Table is for Stored Procedures only (I think).

Try running (Open) the View from the Database Window - can you delete records from here. If not then the View is not updateable.

Robert
 
Hi,

Sorry for the late addition to this thread but I have recently had the same problem and discovered that it is not possible to delete records using a view/stored procedure or by opening the table from the database window unless your table has a primary key defined. After adding a primary key all seemed fine.

Hope this helps.
Roger Crothers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top