Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Please advice

Author  Topic 

shezad
Starting Member

32 Posts

Posted - 2011-02-01 : 06:30:50
I have two form one is master and one is detail

whenever I opened the master form it has menu which
allowed to open child form and once child form
is opend it fired the trigger and updated status
on master form table

now what happening whenever I m trying to save on
child form table it is getting hang

problem is that master form is keeping open
the table and same time child form table trigger
trying to update that one and system is getting
hand so now I put no lock on master form table query

now updation from child form is working on master
table but if dont open child form and do something
write and save on master table form it is giving me error


curosrs update not allowed on table which is open
with nolock option
please advice

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2011-02-01 : 06:44:52
Post the SQL code which is running behind these two forms. Otherwise this would be a guess game for us ...

Go to Top of Page

shezad
Starting Member

32 Posts

Posted - 2011-02-01 : 07:14:24
SELECT WORKORDERID,WORKORDERGRPID,WORKORDERPID,WORKORDERNUMBER,WO_YEAR,WO_MONTH,WORKORDEROPENDATE,
WORKORDERCLSDATE,SECTIONID,ITEMCATEGORY,BBRAMSID,NSN,NOMENCLATURE,PARTSRN,SERIALNO,EQUIPSETCODE,UTC,ORG,
SHOP,PALLETNO,LOCATIONCODE,TMDEUSED,TONO,MASNO,INSP_FREQ,SRD,SYMBOL,ITEMPROCESSTYPEID,ITEMPROCESSUID,PROCESSDESC1
CORRECTIVEACTION,CORRECTIVEREMARKS,STATUS,TASKNO,CHARGECODE,CORRECTBYPERSON,INSPECTEDBYPERSON
from tbl_workorder where workordernumber = 'THU200615520' and ITEMPROCESSTYPEID is not null and
ITEMPROCESSUID is not null
Go to Top of Page

shezad
Starting Member

32 Posts

Posted - 2011-02-01 : 07:15:22
now child form work if i put no lock


SELECT WORKORDERID,WORKORDERGRPID,WORKORDERPID,WORKORDERNUMBER,WO_YEAR,WO_MONTH,WORKORDEROPENDATE,
WORKORDERCLSDATE,SECTIONID,ITEMCATEGORY,BBRAMSID,NSN,NOMENCLATURE,PARTSRN,SERIALNO,EQUIPSETCODE,UTC,ORG,
SHOP,PALLETNO,LOCATIONCODE,TMDEUSED,TONO,MASNO,INSP_FREQ,SRD,SYMBOL,ITEMPROCESSTYPEID,ITEMPROCESSUID,PROCESSDESC1
CORRECTIVEACTION,CORRECTIVEREMARKS,STATUS,TASKNO,CHARGECODE,CORRECTBYPERSON,INSPECTEDBYPERSON
from tbl_workorder with (nolock) where workordernumber = 'THU200615520' and ITEMPROCESSTYPEID is not null and
ITEMPROCESSUID is not null
Go to Top of Page

shezad
Starting Member

32 Posts

Posted - 2011-02-01 : 07:58:28
any help
Go to Top of Page
   

- Advertisement -