|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have created the following trigger it is running successfully on my local sql server
the trigger inserts a row in a child table if there is an insertion in the parent table simply enforcing RI. ok all fine BUT WHEN I EXECUTE THE TRIGGER ON A REMOTE SERVER IT GIVES ME AN ERROR MESSAGE >>both the trigger and error mess r shown below pls can the forum help ? =======================TRIGGER============== create trigger TRG_AutoInsertUserMasterAdmin on usermaster for insert as if (@@ROWCOUNT>0) begin declare @sno int,@loginid varchar(20),@pwd varchar(10) select @sno=sno from inserted SELECT @loginid=Upper(Char(26*Rand()+65))+Upper(Char(26*R and()+65))+Upper(Char(26*Rand()+65))+'INV'+CAST(@s no AS VARCHAR) SELECT @pwd=Upper(Char(26*Rand()+65))+Upper(Char(26*Rand( )+65))+Upper(Char(26*Rand()+65))+'DWP'+CAST(@sno AS VARCHAR) insert into usermasteradmin (sno,loginid,pwd,activedate,statuscode) values (@sno,@loginid,@pwd,GetDate(),'IUA') end ===================ERROR========================== == Microsoft OLE DB Provider for SQL Server error '80040e37' Invalid object name 'usermasteradmin'. line 44 ======================================== the asp page inserts a new record in the usermaster table |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Sql Trigger Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|