-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Problem with SQL Server 2005, please help
PostPosted: Wed Jan 17, 2007 8:28 am 
Newbie

Joined: Tue Jan 16, 2007 1:29 am
Posts: 5
Hi,
I am getting problem with Sql Server 2005.


My nhibernate configaration is as
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" >
<session-factory name="NHibernate.Test">
<!-- properties -->

<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=CURVA_DB\CURVA;initial catalog=curva;User ID=curva;Password=curva;Min Pool Size=2</property>
<property name="show_sql">true</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>

<property name="use_outer_join">true</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!-- mapping files -->
<mapping assembly="Kgisl.Curva.Entity" />
</session-factory>

</hibernate-configuration>

I am using Nhibernate 1.2 beta

When I run any sql command it gives "Could execute query[SQL...."

But when I connect to SQL Server 2000 it works fine.

This is the stacktrace,
場所 NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
場所 NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters)
場所 NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
場所 NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session)
場所 NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria, IList results)
場所 NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria)
場所 NHibernate.Impl.CriteriaImpl.List()
場所 Kgisl.Curva.DataAccess.BaseDataAccess.GetByType(Type type) 場所 D:\Projects\Curva\DataAccess\BaseDataAccess.cs:行 285


Please help me.

Thanks,

Shomun


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 11:50 am 
Beginner
Beginner

Joined: Wed Nov 22, 2006 5:59 am
Posts: 29
Location: London
Can you post your configuration file


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 8:25 pm 
Newbie

Joined: Tue Jan 16, 2007 1:29 am
Posts: 5
Hi Rob

Thanks for your reply.

My hibernate configuaration contains the following,
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" >


<session-factory name="NHibernate.Test">
<!-- properties -->

<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=CURVA_DB\CURVA;initial catalog=curva;User ID=curva;Password=curva;Min Pool Size=2</property>
<property name="show_sql">true</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>

<property name="use_outer_join">true</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<!-- mapping files -->
<mapping assembly="Kgisl.Curva.Entity" />
</session-factory>

</hibernate-configuration>


Please let me know if you need anything else.

Thnaks again,
Shomun


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 1:45 am 
Newbie

Joined: Tue Jan 16, 2007 1:29 am
Posts: 5
I still didn'T fine any clue.
Please help to find out the problem

Shomun


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 2:03 am 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
What is the error?
Please post the full exception stack, including all the errors.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 2:52 am 
Newbie

Joined: Tue Jan 16, 2007 1:29 am
Posts: 5
Hi Ayende
Thanks for your reply.
Its a NHibernate.ADOException

Here is the error message,

could not execute query[SQL: SELECT this_.curva_id as curva1_5_0_, this_.valid_flg as valid2_5_0_, this_.vol_sts_kbn as vol3_5_0_, this_.furi_sei as furi4_5_0_, this_.furi_mei as furi5_5_0_, this_.kanji_sei as kanji6_5_0_, this_.kanji_mei as kanji7_5_0_, this_.sex_kbn as sex8_5_0_, this_.birth_ymd as birth9_5_0_, this_.zip as zip5_0_, this_.adr1 as adr11_5_0_, this_.adr2 as adr12_5_0_, this_.adr3 as adr13_5_0_, this_.tel as tel5_0_, this_.fax as fax5_0_, this_.mtel as mtel5_0_, this_.mmail as mmail5_0_, this_.pcmail as pcmail5_0_, this_.vol_pw as vol19_5_0_, this_.cnt_kbn as cnt20_5_0_, this_.kibou_kbn as kibou21_5_0_, this_.tiken_kbn as tiken22_5_0_, this_.job_kbn as job23_5_0_, this_.reg_dt as reg24_5_0_, this_.rreg_dt as rreg25_5_0_, this_.top_int_curva_id as top26_5_0_, this_.int_curva_id as int27_5_0_, this_.reg_media_id as reg28_5_0_, this_.emp_id as emp29_5_0_, this_.img_path as img30_5_0_, this_.indid_path as indid31_5_0_, this_.pledge_path as pledge32_5_0_, this_.last_med_dt as last33_5_0_, this_.reg_type as reg34_5_0_ FROM volunteer this_]


The stacktrace,
場所 NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
場所 NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters)
場所 NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
場所 NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session)
場所 NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria, IList results)
場所 NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria)
場所 NHibernate.Impl.CriteriaImpl.List()
場所 Kgisl.Curva.DataAccess.BaseDataAccess.GetByType(Type type) 場所 D:\Projects\Curva\DataAccess\BaseDataAccess.cs:行 285


Please let me know if you need any information.

Thanks again,
Shomun


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 9:14 am 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
Sorry, this is not the full exception message.
It is missing the internal exception details.
Please do exception.ToString() and post all the results here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.