我使用休眠從SQL Server 2008.while執行以下代碼休眠方言
Session session = sessionFactory.openSession();
String qry="select Form_Id,SUBSTRING(
(SELECT ('' + t2.Form_Layout_Txt) FROM Form_Layout_Info t2
WHERE t1.Form_Id = t2.Form_Id " +
" GROUP BY Form_Layout_Txt FOR XML path('')), 1,1000000000)
FROM Form_Layout_Info t1 GROUP BY Form_Id";
SQLQuery query = session.createSQLQuery(qry);
recordList = query.list();
我Hibernate屬性訪問數據是
hibernate.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver
hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=abc;integratedSecurity=false;
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.connection.username=sa
hibernate.connection.password=p123asc
我收到以下錯誤
No Dialect mapping for JDBC type: -9
如何解決這個問題。
空指針異常? – Lenymm
不,它不是空指針異常 – user1321824