sharmini
sharmini

Reputation: 1

.Msg 102, Level 15, State 1, Line 9 Incorrect syntax near ','

I am trying to connect to access database using SQL Server Management Studio and I am getting the abvoe error in Title. Here is my code:

EXEC sp_addlinkedserver
@server= N'\\HSS-SQLEXPRESS\HSSSQLE',                     
@provider= N'SQLNCLI',                                         
@srvproduct= N' ',                                         
@datasrc=N'\\HSS-HSS-SQLEXPRESS\HSSSQLE\Data\Testing.accdb',         
GO

The syntax for @datasrc is giving the error. Please help!

Upvotes: 0

Views: 1035

Answers (1)

user6691848
user6691848

Reputation:

Remove the comma after the @datasrc parameter value:

@datasrc=N'\\HSS-HSS-SQLEXPRESS\HSSSQLE\Data\Testing.accdb'

Your last paramter value cannot be followed by ,

Upvotes: 2

Related Questions