zoukankan      html  css  js  c++  java
  • 方言问题


    <!--MySql 驱动程序 eg. mysql-connector-java-5.0.4-bin.jar-->
      <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
      <property name="connection.driver_class">com.mysql.jdbc.Driver</property>

      <!-- JDBC URL -->
      <property name="connection.url">jdbc:mysql://localhost/dbname?characterEncoding=gb2312</property>

      <!-- 数据库用户名-->
      <property name="connection.username">root</property>

      <!-- 数据库密码-->
      <property name="connection.password">root</property>
      
      
      <!--Sql Server 驱动程序 eg. jtds-1.2.jar-->
      <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
      <property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>

      <!-- JDBC URL -->
      <property name="connection.url">jdbc:jtds:sqlserver://localhost:1433;DatabaseName=dbname</property>

      <!-- 数据库用户名-->
      <property name="connection.username">sa</property>

      <!-- 数据库密码-->
      <property name="connection.password"></property>

      
      
      <!--Oracle 驱动程序 ojdbc14.jar-->
      <property name="dialect">org.hibernate.dialect.OracleDialect</property>
      <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>

      <!-- JDBC URL -->
      <property name="connection.url">jdbc:oracle:thin:@localhost:1521:dbname</property>

      <!-- 数据库用户名-->
      <property name="connection.username">test</property>

      <!-- 数据库密码-->
      <property name="connection.password">test</property>



    如果出现如下错误,则可能是Hibernate SQL方言 (hibernate.dialect)设置不正确。
    Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]'last_insert_id' 不是可以识别的 函数名。
    RDBMS方言
    DB2org.hibernate.dialect.DB2Dialect
    DB2 AS/400org.hibernate.dialect.DB2400Dialect
    DB2 OS390org.hibernate.dialect.DB2390Dialect
    PostgreSQLorg.hibernate.dialect.PostgreSQLDialect
    MySQLorg.hibernate.dialect.MySQLDialect
    MySQL with InnoDBorg.hibernate.dialect.MySQLInnoDBDialect
    MySQL with MyISAMorg.hibernate.dialect.MySQLMyISAMDialect
    Oracle (any version)org.hibernate.dialect.OracleDialect
    Oracle 9i/10gorg.hibernate.dialect.Oracle9Dialect
    Sybaseorg.hibernate.dialect.SybaseDialect
    Sybase Anywhereorg.hibernate.dialect.SybaseAnywhereDialect
    Microsoft SQL Serverorg.hibernate.dialect.SQLServerDialect
    SAP DBorg.hibernate.dialect.SAPDBDialect
    Informixorg.hibernate.dialect.InformixDialect
    HypersonicSQLorg.hibernate.dialect.HSQLDialect
    Ingresorg.hibernate.dialect.IngresDialect
    Progressorg.hibernate.dialect.ProgressDialect
    Mckoi SQLorg.hibernate.dialect.MckoiDialect
    Interbaseorg.hibernate.dialect.InterbaseDialect
    Pointbaseorg.hibernate.dialect.PointbaseDialect
    FrontBaseorg.hibernate.dialect.FrontbaseDialect
    Firebirdorg.hibernate.dialect.FirebirdDialect

     




  • 相关阅读:
    IE8使用chrome内核渲染
    JS中的call()方法和apply()方法用法总结(挺好 转载下)
    解决雷达图文字显示不全问题
    echarts legend文字配置多个颜色(转)
    vue中Axios的封装和API接口的管理
    echarts 折线拐点收藏
    echarts 折线图自定义颜色与修改legend颜色
    MUI框架 按钮点击响应不好的问题解决办法
    ECharts将折线变平滑和去掉点的属性
    单例模式——创建型模式01
  • 原文地址:https://www.cnblogs.com/duenboa/p/6665472.html
Copyright © 2011-2022 走看看