本帖最后由 liaoyu45 于 2013-06-26 00:42:23 编辑

解决方案 »

  1.   

    Why do not connect sql server directly?
      

  2.   

    datasource选项应该输入IP或者服务器名,
    browser应该是数据库名。
    不要使用windows验证,使用SQLSERVER验证。
      

  3.   

    why couldn't use windows authorization? it is recommended by MS.
    Security Note  When possible, use Windows Authentication. If Windows Authentication is not available, prompt users to enter their credentials at run time.另外说一下使用File-based Database的作用如下:
    You can attach an existing database file to a local instance of SQL Server, or you can create a database file to attach to the local instance.这个作用是将数据库挂在到你选择的INSTANCE上面。 操作步骤参考How to: Connect to a File-based Database
      

  4.   

    楼上的,英文看不懂,这里是中文论坛,还有,用VS建立数据源连接,如果用
    windows验证,那么程序只能在本机运行,除非他只用到本机上面,否则移植到其他电脑都会连接不上。
      

  5.   

    windows验证,那么程序只能在本机运行?给出解释为什么别的机器用不了?而且论坛也没说不能用英文吧。
      

  6.   

    关键是我该如何设置这个用户名和密码,其它不重要。比如把甲服务器上的数据库文件挂在乙服务器上,怎么样都无所谓。why couldn't use windows authorization? it is recommended by MS.
    Security Note  When possible, use Windows Authentication. If Windows Authentication is not available, prompt users to enter their credentials at run time.另外说一下使用File-based Database的作用如下:
    You can attach an existing database file to a local instance of SQL Server, or you can create a database file to attach to the local instance.这个作用是将数据库挂在到你选择的INSTANCE上面。 操作步骤参考How to: Connect to a File-based Database
      

  7.   

    why couldn't use windows authorization? it is recommended by MS.
    Security Note  When possible, use Windows Authentication. If Windows Authentication is not available, prompt users to enter their credentials at run time.另外说一下使用File-based Database的作用如下:
    You can attach an existing database file to a local instance of SQL Server, or you can create a database file to attach to the local instance.这个作用是将数据库挂在到你选择的INSTANCE上面。 操作步骤参考How to: Connect to a File-based Database
    用户名密码是你要ATTACH数据库INSTANCE的用户名密码
      

  8.   

    1.这个选项是指明MDF以便attach上去,可以直接使用windows 验证实际上系统已经是使用本地的adminstrator登入sql了,
    也可以输入sql 认证模式,比如使用sa,密码就是安装MSSQL时候设置的。
    2. 楼主可以使用已经有的数据库来连接就行了,每次载入MDF的链接用途不太大,因为一般应用发布是数据库已经在SERVER端attach了。
      

  9.   

    why couldn't use windows authorization? it is recommended by MS.
    Security Note  When possible, use Windows Authentication. If Windows Authentication is not available, prompt users to enter their credentials at run time.另外说一下使用File-based Database的作用如下:
    You can attach an existing database file to a local instance of SQL Server, or you can create a database file to attach to the local instance.这个作用是将数据库挂在到你选择的INSTANCE上面。 操作步骤参考How to: Connect to a File-based Database
    用户名密码是你要ATTACH数据库INSTANCE的用户名密码不管用的不管用的不管用的。