Database | Proc | Application | Created | Links |
sybsystemprocs | sp_inst15015msg_us_mesg | 31 Aug 14 | Defects Dependencies |
1 2 /* 3 ** SP_INST15015MSG_US_MESG 4 ** 5 ** Description: 6 ** sproc to install English msgs. 7 ** 8 ** Parameter: 9 ** @error_number 10 ** @severity_number 11 ** @message_text 12 ** 13 */ 14 create procedure sp_inst15015msg_us_mesg 15 @error_number int, 16 @severity_number int, 17 @message_text varchar(255) 18 as 19 declare @retval int 20 declare @fmtbuf varchar(255) 21 set nocount on 22 select @retval = 0 23 select @retval = (select 1 24 from master.dbo.sysmessages 25 where error = @error_number and langid is NULL 26 ) 27 /* message is not available so insert it. */ 28 if (@message_text IS NOT NULL) 29 begin 30 if (@retval = 1) 31 begin 32 select @fmtbuf = (select "Modifying Message: " 33 + convert(varchar(8), @error_number) + " Severity: " 34 + convert(varchar(8), @severity_number)) 35 print @fmtbuf 36 begin tran 37 update master.dbo.sysmessages 38 set error = @error_number, 39 severity = @severity_number, 40 dlevel = 2, /* dlevel is always 2 */ 41 description = @message_text, 42 langid = NULL /* messages are shipped in English. */ 43 where langid is NULL and error = @error_number 44 commit tran 45 end 46 else 47 begin 48 select @fmtbuf = "Adding Message: " 49 + convert(varchar(8), @error_number) + " Severity: " 50 + convert(varchar(8), @severity_number) 51 print @fmtbuf 52 begin tran 53 insert master.dbo.sysmessages values ( 54 @error_number, 55 @severity_number, 56 2, /* dlevel is always 2 */ 57 @message_text, 58 NULL, 59 NULL) /* messages are shipped in English. */ 60 commit tran 61 end 62 end 63
DEPENDENCIES |
PROCS AND TABLES USED read_writes table master..sysmessages (1) CALLERS called by proc sybsystemprocs..sp_inst15015msg_all_us_mesgs called by proc sybsystemprocs..sp_inst15015msg called by proc sybsystemprocs..sp_downgrade |