Hi!
I am facing the following problem while trapping the errors.
I have a table Test (id int, no int, name varchar(20)) where id & no are the primery keyes. I want to update this table depending on the matching of id & no. I have written the following code to update the same:
update test
set name = 'James'
where id=5 and no=30
print @@error
Even if the record is not available in the given condition it is still showing the value of @@error as 0.
Pl help me in resolving the same.
Thanks in advance.
bye.
I am facing the following problem while trapping the errors.
I have a table Test (id int, no int, name varchar(20)) where id & no are the primery keyes. I want to update this table depending on the matching of id & no. I have written the following code to update the same:
update test
set name = 'James'
where id=5 and no=30
print @@error
Even if the record is not available in the given condition it is still showing the value of @@error as 0.
Pl help me in resolving the same.
Thanks in advance.
bye.