开发者

What mstrConnection should I use on a webpage to access local SQL Server Express (localhost\SQLEXPRESS)?

Would the following suffice?

Dim mstrConnection As String =
  "workstation id=COMPUTER;packet size=409开发者_开发知识库6;data source=localhost\SQLEXPRESS;
    integrated security=false;user id=x309-PC\x309;password=abc"


You should be able to get away with a simpler connection string like the following:

Data Source=(local)\SQLExpress;Initial Catalog=myDatabaseName;User ID=myUsername;Password=myPassword;

You also need to make sure in the SQL server security logins you have both mapped the user to a SQL login as well as given the user rights to the database you are interacting with. You can download MS SQL management studio express 2008 to view and set these settings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜