Why does sp_processmail fail with an error 'Supplied datatype for set_user is not allowed, expecting 'varchar'' on SQL 7?

Neil Pike

February 4, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. This is a known problem, i.e. bug. You have to rewrite sp_processmail (courtesy of Wayne Snyder). Microsoft haven't fixed it yet - maybe in SP2....

The problem is actually with xp_sendmail which returns an error (@set_user datatype is incorrect)..

Microsoft changed the @set_user, and @dbuse params in sp_processmail to sysname, and did *NOT* go back and change xp_sendmail...

The temp fix is to change sp_processmail as follows

create procedure sp__processmail --- 1996/06/19 17:30
@subject varchar(255)=NULL,
@filetype varchar(3)='txt',
@separator varchar(3)='tab',
@set_user varchar(30)='guest', --Change this back from sysname to varchar
@dbuse varchar(30)='master' --Change this back from sysname to varchar
as

........./* rest of procedure */

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like