我的MsSQL是设置的Windows身份验证。这个连接代码应该怎么样写呢。求高手指导。
原来看到的:
<property name="connection.connection_string">
Server=.\SQLExpress;Datebase=NHCookbook;Trused_Connection=SSPI
</property>
可是调试的时候无法插入数据到MsSQL 我的是MsSQL2008.谢谢
原来看到的:
<property name="connection.connection_string">
Server=.\SQLExpress;Datebase=NHCookbook;Trused_Connection=SSPI
</property>
可是调试的时候无法插入数据到MsSQL 我的是MsSQL2008.谢谢
解决方案 »
- 在父窗体中打开子窗体的问题 急
- c# winform 如何动态设置窗体大小?
- 【斗地主游戏的表设计--有做过的朋友帮帮忙】
- 请问,如何找到gridview控件中放在头模板中的控件?就是放在gridview的HeaderTemplate中的控件。
- DataGrid中如何在每行最后添加一个LinkButton,如何设置该LinkButton事件,显示该条记录的详细信息?
- 绑定到数据库的DropDownList的内容不能改变吗?
- 关于装箱的问题。
- winform下datagrid里面加checkbox的问题
- 开发一个IP过滤软件,哪位大侠给点思路
- 有关Calendar的问题
- 请教各位大神,关于AggregateException不能捕获并行迭代的全部异常的问题
- C# 多线程问题
hibernate.cfg.xml <!-- properties -->
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=localhost;initial catalog=nhibernate;Integrated Security=SSPI</property>
配置还可以写在.config文件中 <nhibernate>
<add key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"
/>
<add key="hibernate.dialect"
value="NHibernate.Dialect.MsSql2000Dialect"
/>
<add key="hibernate.connection.driver_class"
value="NHibernate.Driver.SqlClientDriver"
/>
<add key="hibernate.connection.connection_string"
value="Server=localhost;initial catalog=test;user=sa;password="
/>
</nhibernate>具体参考http://www.cnblogs.com/me-sa/articles/524162.html