如果用SQLServer的SQLEXPRESS版本的话,连接时经常回遇到这个问题,查了很多终于找到了解决方法。
The typical error when dealing with Express includes:
a. User is not aware of SqlExpress was installed as a named instance, consequently, in his/her connection string, he/she only specify ".","localhost" etc instead of ".\SqlExpress" or "\Sqlexpress".
b. Np was disabld by default after installing SqlExpress.
c. If Sqlexpress was installed on the remote box, you need to enable remote connection for Express.
其中a的.\SqlExpress必须写在web.config文件中,如:
<connectionStrings>
<add name="NorthwindConnectionString" connectionString="Data Source=.\SqlExpress;Initial Catalog=Northwind;User ID=sa;Password=test"
providerName="System.Data.SqlClient" />
</connectionStrings>
再用ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString把connectionStrings从应用程序中读出来。如果直接把.\SqlExpress写在应用程序中如:SqlConnection conn = new SqlConnection("data source=.\ SqlExpress;initial catalog=Northwind;user id=sa;password=test")这样也是有错误的!
Please read the following blog for best practice of connecting to SqlExpress.
http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx
分享到:
相关推荐
(provider:命名管道提供程序,error:40-无法打开到SQL server的连接) 处理:1、在配置工具->Sql server 外围应用配置器->服务器和连接的外围应用配置器-Sql2005->Database Engine->远程连接->同时使用TCP/IP和...
SQL Server 出现Error: 1326错误 我们在在使用SQL Server时都会遇到使用SQL ...(provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 5) An e
Named pipes can be used to provide communication between processes on the same computer or between processes on different computers across a network. If the server service is running, all named pipes ...
Unplasticized polyvinyl chloride (PVC-U) pipes –General quality requirements and testing English version of DIN 8061:2009-10
资源名称:SQL Server 2005数据库技术与应用 大学教案2 SQL Server 2005的安装与配置资源截图: 资源太大,传百度网盘了,链接在附件中,有需要的同学自取。
NamedPipes = require ' named-pipes ' server = NamedPipes . listen ( ' your-pipe-name ' ) server . on ' connect ' , ( client ) -> console . log ' New Client ' client . send ' welcome ' , ' something...
:unix-pipes 常见的Lisp Unix管道作为流。 目前这仅适用于Linux。 我写这篇文章是因为在使用外部程序运行程序时我想要内存中的流,并且发现flexi-stream无法正常工作。 这就导致了关于阅读流的困惑,然后我就结束...
λ: import Pipes λ: import qualified Pipes.Prelude as PP λ: import Pipes.RealTime λ: import Data.Time λ: import Data.Time.Clock λ: -- Pass values at 2 Hz λ: runEffect $ each [1..4] >-> ...
火箭管 功能强大的TypeScript管道,可以像流行的FP库中的Maybe或Either一样链接Promise和ADT。 特征 :candy: 糖管。 不用担心诺言或ADT本身。 直接使用已解析的值。 :light_bulb: 类型推断。 无需担心手动键入工作...
粉碎Pipes,Pipes.Safe和sqlite-simple的功能 用法 > import Pipes.SQLite > import qualified Pipes as P > import qualified Pipes.Prelude as P > import Pipes.Safe > import qualified Database.SQLite.Simple...
Named Pipes和Virtual Interface Adapter(VIA)。代开SQL Server配置管理器之后,会显示一个配置SQL Server服务,SQL Server网络协议和SQL Native Client协议的节点。可以通过展开SQL Server 2008网络配置节点进行...
vim-stream:vims-在终端中使用vim命令进行管道过滤
软件体系结构期末复习总结 什么是软件体系结构? 软件体系结构是具有⼀定形式的结构化元素,抽象的讲,软件体系结构包括构成系统的设计元素的描述,设计元素的交互,...连接件:pipes --> 连接⼀个源和⼀个⽬的过滤器。
管道 在Rust中对pipes.sh进行过度设计的重写 ...可以使用位于~/.config/pipes-rs/config.toml TOML来配置pipe ~/.config/pipes-rs/config.toml 。 以下是具有默认设置的示例文件: bold = true color_mode = " ansi
资源来自pypi官网。 资源全名:simple_pipes-0.1.0-py3-none-any.whl
Added TFlexFileFormat.StreamSupport property (default True), which difines, is it necessary to open file stream or give the file name only. - FIX: If the TCustomProp.Assign method calls when the ...
Pipes.js像管道一样在Unix上编写函数(例如Elm / Elixir / F#) 使用管道运算符可以使您将编程视为转换步骤。 该编译器将用Lo-Dash的链替换管道运算符。用法定义功能这些功能不了解链接系统,可以在有或没有...
Win32命名管道示例使用Win32 API在C ++中使用命名管道的简单示例代码。 有关完整说明,请参见此处的随附博客文章:作者 。执照该代码可根据MIT开源许可证免费提供(有关详细信息,请参阅随附的LICENSE文件)。...
:rocket: 内存优化,消耗减少约40%,压缩大小减少约20%,引入了新的双向字典来管理数据 :open_book: 新的API ,可以更快,更轻松地使用和交互 :hammer_and_wrench: 整体修复,以获得更好的图形和更好的页面匹配...