nhibernate 配置mysql_NHibernate 支持的数据库及配置参数

本文介绍了如何使用NHibernate配置连接不同的数据库,如SQL Server、Oracle、Access、Firebird、PostgreSQL、DB2 UDB、MySQL和SQLite。针对每种数据库,提供了相应的配置示例,包括连接字符串、方言和驱动等信息,同时也提到了使用过程中可能遇到的问题和解决方案。
摘要由CSDN通过智能技术生成

NHibernate is primarily tested on Microsoft SQL Server 2000. It is also known to work on these databases:

Microsoft SQL Server 2005/2000

SQL Server 2005 and 2000 are the primary databases used by the developers of NHibernate.

Configuration example:

NHibernate.Connection.DriverConnectionProvider

NHibernate.Dialect.MsSql2005Dialect

NHibernate.Driver.SqlClientDriver

Server=(local);Initial Catalog=dbname;User Id=user;Password=********

For SQL Server 2000, change the dialect to NHibernate.Dialect.MsSql2000Dialect

Issues

SQL Server sometimes ignores columns specified in ORDER BY clause of a query if they are not included in the SELECT  clause. This behavior is actually valid according to the SQL standard,  but may be surprising. For example, a query like this is not guaranteed  to be ordered correctly:

from Person p order by p.Company.Name

Oracle

Oracle 9i and 10g are supported, both using Microsoft driver (System.Data.OracleClient) and using Oracle driver (Oracle.Data.OracleClient).

Issues

Microsoft's  driver does not handle long character strings correctly. An error  happens in some circumstances when using a string of length 2000-4000 as  a pa

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值