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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sql system storeprocedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-09-06 : 23:51:37
robert writes "this code fails at the sp_addlogin line


IF NOT EXISTS
(SELECT letterbox FROM addressbook
WHERE letterbox = 'iirs:%username%')
BEGIN

sp_addlogin '%username%', 'password1', 'iirs',

INSERT
INTO addressbook(expdate, type, letterbox, displayname,
information, profile)
VALUES ('Dec 31 3000', 'iirs', 'iirs:%username%',
'%last%,%first%@%company%', '%first%,%last%-%company%',
0)

sp_password 'password1', '%password2%', '%username%'

INSERT INTO iirs..REGISTER(lastname, firstname, email, company,
phone, fax, authdate, useridnew, password, status, url, keycode)
VALUES ('%last%', '%first%', '%email%', '%company%', '%phone%',
'%fax%', getdate(), '%username%', '%password1%',
'AUTHORIZED', '%REMOTE_ADDR%', '%keyword%')
END

can u suggest a fix
thanks
r"

   

- Advertisement -