社区
C#
帖子详情
用nHibernate开发winform时出现的The dialect was not set 的问题,向高手求教。
leo1111111
2005-08-19 03:26:25
用nHibernate开发winform时出现总是出现The dialect was not set. Set the property hibernate.dialect.的异常。出现异常的地方在cfg.AddXmlFile的时候,请教高手们解答,谢谢!
...全文
230
4
打赏
收藏
用nHibernate开发winform时出现的The dialect was not set 的问题,向高手求教。
用nHibernate开发winform时出现总是出现The dialect was not set. Set the property hibernate.dialect.的异常。出现异常的地方在cfg.AddXmlFile的时候,请教高手们解答,谢谢!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
csdsuper
2006-05-07
打赏
举报
回复
我也出现这个错误,关注着
我的配置文件是
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" >
<session-factory name="SeNet.Base.NHibernateAPI">
<!-- properties -->
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=server;initial catalog=Test;user id=sa;password=123;Min Pool Size=2</property>
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect/property>
<property name="use_outer_join">true</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!-- mapping files -->
<mapping file="People.hbm.xml"/>
<mapping file="Users.hbm.xml"/>
</session-factory>
</hibernate-configuration>
zcyneu
2005-09-01
打赏
举报
回复
下面是应用程序app.config设置,(连接Oracle),你可以参考一下。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<nhibernate>
<add
key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"
/>
<add
key="hibernate.dialect"
value="NHibernate.Dialect.Oracle9Dialect"
/>
<add
key="hibernate.connection.driver_class"
value="NHibernate.Driver.OracleClientDriver"
/>
<add
key="hibernate.connection.connection_string"
value="Data Source=ORAZCY;user=EMERGENCY;password=emergency"
/>
</nhibernate>
<log4net>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] -%m%n" />
</layout>
<root>
<level value="INFO" />
<appender-ref ref="ConsoleAppender" />
</root>
</appender>
</log4net>
rhs
2005-08-22
打赏
举报
回复
app.cofig文件中配置nhibernate有错误
leo1111111
2005-08-22
打赏
举报
回复
顶一下
Winform
+Spring.net+
Nhibernate
+Mysql简单示例
曾经,有个spring+Hibernate的框架,用着很爽^-^。一直琢磨着在
winform
上也搞一个spring.net+
Nhibernate
的框架,。这个框架使用的是Spring.NET-1.3.2,
NHibernate
-3.2.0,在mysql5.1上建了一个user表,字段请各位看映射文件啦(什么?你不懂什么是映射文件?那劝客官还是洗洗回家睡吧:)IDE用的是vs2008,.net框架用的是3.5。虽然配置得比较粗糙,好歹也算是个能跑的范例,在此抛砖引玉,希望各位有什么改进的建议也能在留言中提出。
NHibernate
搭建的三层简单用户管理系统
通过一个简单的例子来演示基于
NHibernate
的三层结构应用程序
开发
过程。
C#/.Net企业级系统架构设计实战精讲教程
课程通过实际项目融入常用
开发
技术架构,讲授风格独特,提供详细上课日志及答疑,赠送配套的项目架构源码注释详细清晰且表达通俗,均能直接在实际项目中应用,正真的物超所值,价格实惠 任务作业: 综合运用《C#/...
SprintNet2.0+
NHibernate
3.3+
WinForm
实例源码
SprintNet2.0+
NHibernate
3.3+
WinForm
源码,运行
时
,请先创建好数据库(不用建表),并修改相应的数据库帐号和密码
Nhibernate
3.0
最新的3.0版本,Welcome to
NHibernate
! --------------------------------------------------------------------------------
NHibernate
is a .NET based obj
ect
persistence library for relational databases.
NHibernate
is a port of the excellent Java Hibernate relational persistence tool. You can find tutorials and samples in the
NHibernate
community site wiki and blog. Latest Version Details of the latest version of
NHibernate
can be found on SourceForge at http://sourceforge.net/proj
ect
s/
nhibernate
/. Documentation All available resources on
NHibernate
can be found online:
NHibernate
deep grok. The reference documentation for
NHibernate
is available on-line on the website. Bug Reports If you find any bugs please use the JIRA bug tracker. Licenses This software is distributed under the terms of the FSF Lesser GNU Public License (see lgpl.txt). This product uses software developed by the Apache Software Foundation (http://www.apache.org/). log4net This product includes source code from an article written by Jason Smith. Iesi.Coll
ect
ions - original code can be found at Add Support for "
Set
" Coll
ect
ions to .NET
C#
110,572
社区成员
642,565
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章