zoukankan      html  css  js  c++  java
  • ActiveRecord 的类型初始值设定项引发异常

    最近在研究ActiveRecord网上有很多贴子讲怎么用的。但自己照做就是出错。

    最终定位在配置文件出错。应该是ActiveRecord有更新的原因。在国外的网站把配置复制了一份替换。问题解决了。我用的是castle.ActiveRecord + mysql 

    <configSections>    
          <section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
    </configSections>
    <activerecord isWeb="true">
        <config>
          <add key="connection.driver_class" value="NHibernate.Driver.MySqlDataDriver" />
          <add key="dialect"                 value="NHibernate.Dialect.MySQLDialect" />
          <add key="connection.provider"     value="NHibernate.Connection.DriverConnectionProvider" />
          <add key="connection.connection_string" value="Database=test;Data Source=localhost;User Id=root;Password=root;" />
          <add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />
          <add key="query.factory_class" value="NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory, NHibernate" />
        </config>
      </activerecord>

    这里还有关于连别的库的配置:

    http://docs.castleproject.org/Default.aspx?Page=Configuration%20Reference&NS=Active%20Record&AspxAutoDetectCookieSupport=1

  • 相关阅读:
    error C2065: 'IDD_DIALOG1' : undeclared identifier
    MySQL API函数
    MFC连接MySQL C API方法
    MFC连接MySQL
    MFC连接MySQL数据库方法
    error C4430: error 2141
    GetLastError
    char与CString相互转换
    处理图片(获取图片详细信息)大小 格式
    RGB颜色值 十六进制颜色码 转换
  • 原文地址:https://www.cnblogs.com/lookforFree/p/4333795.html
Copyright © 2011-2022 走看看