Adil
Adil

Reputation: 27

Error in connection establishing in asp.net mvc

I am trying to build a database connection in asp.net in V.S 2015 using MVC 5 but I have found the error "Keyword not supported". I have not found any syntax errors. I am actually following a tutorial and according that I am doing it correctly. I tried to solve this from other sources but still get the same result .

Here is my code:

<add name="Default" connectionString="PAK-PC\SQLEXPRESS; Database=asp; Trusted_connection=True;" providerName="System.Data.SQLClient" />

Upvotes: 0

Views: 21

Answers (1)

David
David

Reputation: 218818

The connection string is just a series of key/value pairs. You forgot the key for this value:

PAK-PC\SQLEXPRESS

Should be:

Server=PAK-PC\SQLEXPRESS

Upvotes: 1

Related Questions