Reputation: 11
DB="Source={SQL Server};Server=CALVINRUKA-PC\SQLCALVIN;DataSource=DWDSCal\Tables;Uid=sa;PWD=;Trusted-Connection=Yes;"
I using SQL Server 2008 R2 to connect with HTML page. I trying to connect HTML page with login to SQL Database. I have try called the Source but didnt work.
Upvotes: 0
Views: 151
Reputation: 337700
As you've said you're using SQL Server 2008 R2, try using a connection string in this format:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Also ensure that you've enabled SQL Server and Windows Authentication mode
in your SQL Server settings.
Upvotes: 1
Reputation: 57996
To create a valid connection string, you can:
connection.udl
For ASP.NET, you will use everything except Provider=SQLOLEDB.1;
Upvotes: 0