开发者

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

  1. user log into app.
  2. DB returns a session ID
  3. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜