DavidT_macktool
Well-known member
SQl before edit - RESOLVED in code
Is there a way to set up a SQL backend stored procedure that will not allow a record to be edited if the date is before a specified date?
It is an accounting type issue.
I want to have a table with one date in it (accounting date) that represents the date the books are officially closed for the month.
I want a procedure for the INVOICE table that will not allow any VB.net windows forms to edit records with a date < accounting date. Kind of a Before-Edit function that checks the date of the record.
I can do it in the VB.net program but I am having trouble with the grid forms and allowing some records to be edited and others to not be edited.
I will need to use the same functionality on the JOURNAL, TIME, and PARTIALS tables also. Doing it at the server level will help by not having to duplicate code over 8 similar forms.
Thanks for reading,
Is there a way to set up a SQL backend stored procedure that will not allow a record to be edited if the date is before a specified date?
It is an accounting type issue.
I want to have a table with one date in it (accounting date) that represents the date the books are officially closed for the month.
I want a procedure for the INVOICE table that will not allow any VB.net windows forms to edit records with a date < accounting date. Kind of a Before-Edit function that checks the date of the record.
I can do it in the VB.net program but I am having trouble with the grid forms and allowing some records to be edited and others to not be edited.
I will need to use the same functionality on the JOURNAL, TIME, and PARTIALS tables also. Doing it at the server level will help by not having to duplicate code over 8 similar forms.
Thanks for reading,
Last edited: