Showing posts with label sdk. Show all posts
Showing posts with label sdk. Show all posts

Thursday, March 8, 2012

.NET FW SDK QuickStart SQL-Express Error: Msg 102 ... Incorrect syntax.

Hi,

I have followed the steps from the .NET FW SDK QuickStart Configuration (C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Samples\Setup\html\ConfigDetails.htm), and have got an error message trying to grant the ASP.NET User account access to the databases by the command sqlcmd -E -S (local)\SQLExpress -Q "sp_grantlogin LEONEW\ASPNET" where LEONEW is my local machine name, and the ASPNET account exists in the Users group.

I am getting the error message: Msg 102, Level 15, State 1, Server LEONEW\SQLEXPRESS, Line 1
Incorrect syntax near '\'.

Please help if you know how to resolve this. Thanks in advance.

Alex.

Did you try putting apostrophes around the login name:

'LEONEW\ASPNET'

|||I have tried with no success sqlcmd -E -S (local)\SQLExpress -Q "sp_grantlogin N' LEONEW\ASPNET'".|||

Do you get the same error?

What about

sqlcmd -E -S (local)\SQLExpress -Q "sp_grantlogin 'LEONEW\ASPNET'"

If I use it without the apostrophes I get the same error as you:

Msg 102, Level 15, State 1, Server <...>, Line 1
Incorrect syntax near '\'.

If I add the apostrophes the command succeeds.

|||You are absolutely right. Thanks.

.net framework upgradation

hi,
I have installed vs.net 2002 (framework 1.0) in my system.
I have downloaded the framework 1.1 and sdk and installed both of them.
but the framework is not modified to 1.1 for vs.net. can u give a
solution to this problem.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Vijaya,
If you install 1.1 of the framework, VS 2002 will continue to use the 1.0
version. VS 2003 will use the 1.1 version. You can have both versions of
the framework on your PC as well as both version of VS (which I do) with no
problems. VS 2002 will use to older framework and VS 2003 will use the
newer.
J.R.
Largo SQL Tools
The Finest Collection of SQL Tools Available
http://www.largosqltools.com
"Vijaya sagar" <vjsaga@.yahoo.com> wrote in message
news:OyZZzTMjDHA.1672@.TK2MSFTNGP09.phx.gbl...
> hi,
> I have installed vs.net 2002 (framework 1.0) in my system.
> I have downloaded the framework 1.1 and sdk and installed both of them.
> but the framework is not modified to 1.1 for vs.net. can u give a
> solution to this problem.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!