Microsoft
Software
Hardware
Network
Question : SQL 2005 Syntax Error 'CREATE USER'
I'm trying to do something ultra-simple, yet SSMS keeps telling me there's a syntax error in this statement:
CREATE USER oboTest2
I pulled it straight from an example in a Microsoft Tech Ed document. I had previously created a server login of the same name as the user, and was trying to create the database user of the same name. This first piece of code executed fine:
USE master
GO
EXEC sp_addlogin oboTest1, pa$$word, myDatabase
EXEC sp_addlogin oboTest2, pa$$word, myDatabase
GO
but when I try to execute this:
USE myDatabase
GO
CREATE USER oboTest1
GO
SSMS insists:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'USER'.
According to what I've read, this should be a perfectly legit syntax for 'CREATE USER' . Any ideas?
Answer : SQL 2005 Syntax Error 'CREATE USER'
Use. Sp_adduser instead of the above for SQL 2000
Posted via EE Mobile
Random Solutions
Access 2007 Update Multiple Columns with a twist
SQL Functions
I get a error message when I reference a dll file to my C# Window application
New lines for Javascript's Confirm in .NET
The World Wide Web Publishing Service (WWW Service) did not register the URL prefix <a rel="nofollow" href="https://*:443/" target="_blank">https://*:443/</a> for site 1.
How do I find MDI Active Child from toolbar on MDI Parent in VB.NET Winforms Application?
how to fix an image in certain place of the Word document
vpn hangs on verifying username and password
how to devevlope voice chat applications using C#.net ?
Make MFC app invisible on startup (Hide main dialog)