BUG: Sp_processmail Returns Datatype Error Message (239074)
The information in this article applies to:
This article was previously published under Q239074
BUG #: 100646 (SQLBUG_70)
SYMPTOMS
When you attempt to run sp_processmail to process queries sent through e-mail, you receive the following error message:
Server: Msg 18007, Level 16, State 1, Line 0
Supplied datatype for @set_user is not allowed, expecting 'varchar'
CAUSE
Sp_processmail declares both @set_user and @dbuse using the sysname datatypes. This stored procedure then calls sp_sendmail, which declares both of those variables as varchars.
WORKAROUND
Change sp_process mail to declare @set_user and @dbuse as varchar(128). To do this, follow these steps:
- Start Query Analyzer, verify master is the current database and execute the following command to view the text of the stored procedure:
sp_helptext sp_processmail
- Copy the text of the stored procedure to Notepad or another text editor.
- Add the following two lines above the line "create procedure sp_processmail":
drop procedure sp_processmail
go
- Modify the following two parameter declarations from:
@set_user sysname='guest',
@dbuse sysname='master'
to:
@set_user varchar(128)='guest',
@dbuse varchar(128)='master'
- Now, copy the new text back to the Query Analyzer and run it.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug KB239074 |
---|
|