Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 27th, 2003, 06:06 AM
bobby169 bobby169 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: India
Posts: 24 bobby169 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to bobby169
Post Sql Trigger Problem

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

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Sql Trigger Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT