Hi!
I'mnew in SQL and Ive beenthe problem bellow:
I lock a record in oneforeign table and automaticaly SQL lock the record that matches on primary table.
But this occours just in some primaries tables and not in all. I need that just the table that areof SELECT are lock. How can I do this?
Example:
** At open of the invoice:
SET ISOLATION LEVEL READ UNCOMMITTED
BEGIN TRANSACTION
SELECT * FROMINVOICE WITH (ROWLOCK UPLOCK) WHERE ( ID =15 )
******* at the end of invoice:
INSERT INTO INVOICE ........
COMMIT TRANSACTION
END
******* The relationship are:
INVOICE<>>ITENS_INVOICE
ITENS_INVOICE <>> PRODUCTS
CUSTOMER <>> INVOICE
VENDORS<>> INVOICE
Just the INVOICE and PRODUCTS records involved in Transaction are lock. ( The CUSTOMER and VENDORS are not locked for example )
But I need that just INVOICE record be locked.
Thanks for alland sorry my English.
Igor Sane
So Paulo - Brazil