Dataset Binding stored procedures update/insert/delete
I am currently having a problem since the DB has been changed.
I am using Datasets for a c# application, and there is a user management system. For the security issues, our current DB design is like
- user log into app.
- DB returns a session ID
- On use of any other stored procedures, a session ID must be specified.
BUT, the DB didn't request session ID before.
Since I am using the datasets, I used update/insert/delete stored procedures with
"TableAdaptor Configuration Wizard". Bind Commands to Existing Stored Procedures (choose stor开发者_StackOverflow中文版ed procedures to call and specify any required parameters)
Now, it seems like I have to specify session ID for Insert/Update/Delete stored procedures. How do I specify session ID parameter here? It seems like I have to pick one return parameter variable from a select statement.
Yes you would specify a session or GUID parameter to your insert/update/delete stored procedures. That would provide some sort of locking so that you only update/delete the latest copy of your records. Obviously you need to add a session or GUID field to you tables. Abd yes, every time you make a change to the underlying row in database you need to explicitly include an update or insert on that field.
精彩评论