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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-08-01 : 09:56:44
|
| Cuejay writes "This is my trigger:(it's definitely primitive but it ALMOST gets the job done)CREATE TRIGGER trgCntctInfoINS ON [NAME] FOR DELETEASDECLARE @NAMEID NUMERIC(10)DECLARE @COMMAND CHAR(1000) SELECT @NAMEID = (SELECT NAMEID FROM DELETED)EXEC master..xp_cmdshell "cd E:"EXEC master..xp_cmdshell "cd E:\jnet"EXEC master..xp_cmdshell "cd E:\Jnet\contactinformation"print @nameidselect @command = 'exec master..xp_cmdshell "call E:\Jnet\contactinformation\contactinfo.exe' + @nameid +'"'exec @commandprint @commandEXEC master..xpcmdshell "exit"When I run it from query analyzer I get "Server: Msg 8115, Level 16, State 6, Procedure trgCntctInfoINS, Line 36Arithmetic overflow error converting varchar to data type numeric.The statement has been terminated."On select @command = 'exec master..xp_cmdshell "call E:\Jnet\contactinformation\contactinfo.exe' + @nameid +'"'I'm not converting anything!!! Does anyone know why I'm getting this error???HEEEEEEEELLLLLLLLLLLLLLLLLLPPPPPPPPPPPPP" |
|
|
|
|
|