A1VBCode Forums

vb6 and sql 2005 multi user problem


http://a1vbcode.com/vbforums/Topic31160.aspx

By june1282 - 1/16/2012

Dear All !



I upgrade (vb6 and access)application to sql server 2005 application(changed back end to sql). I have 2 forms, one is "Voucher" and another one is "reprint voucher".

2 forms use same one database table (gridVoucher), which is link to LIST VIEW.



When 1st user use "voucher form" (she is opening new voucher for her customer ). and 2nd user view her previous voucher with "reprintVoucher form" at the same time. gridVoucher is replace by reprintVoucher form. Then 1st user save his voucher, stock

items wrong. I use INSERT INTO statement to save voucher data. (INSERT INTO VoucherDetail SELECT * FROM gridVoucher) at "voucher form".



I want to lock gridVoucher table when it is used by user.

Please give advise better suggestion for this problem.



Yours

june1282