如何解决这个问题?

如何解决这个问题?

问题描述:

我在做项目,对我正在做的一件事感到困惑,这是一种横断面查询,用于将化工产品的销售订单放在多个表中.我已经完成插入部分,但是在删除中出现问题,如何解决事务表中的删除查询,为此需要将我的数据表放入会话中,所以我如何将其放入会话中? answer

i m doing project and am confused with one thing I am working on, a transection query for puting the sales order of chemicals product in more than one table. I have completed the insertion part but problem occurs in deletion how to solve deletion query in transaction table and for that it is require to put my data table into session so how can i put it in session?????hope i will get proper answer

我打算在这里进行答复:

I am going to venture a reply here:

'store table in Session
Session("TranTable") = datatable

if page.ispostback then
    ' 1) retrieve deleted rows from request object
    ' 2) delete from datatable stored in session
    ' 3) use data adapter to sync changes back to DB
    ' 4) provide response to user 
end if



或者,不要将其存储在Session中并执行上面的1),然后在数据库上触发常规的删除查询.



Alternately, dont store in Session and do 1) above followed by firing normal delete queries on the DB.