I have an exception "Connection must be open for this operation" when I call
this code:public void MyFunc()
{
...
}

what is wrong ?

2009/8/19 NHibernate1 <[email protected]>

>
> Hi Tuna ,
>
> Thanks for the quick response . Nope :( stcik to 1.2 only . Below is
> the code in short :
>
> Func1(ObjId)
> {
> ....
>
> Func2(ObjId)
> .....
>
> }
>
> Func2(ObjId)
> {
> ....
>
> Func3(ObjId)
> .....
>
> }
>
> Func2(ObjId)
> {
> ....
>
> if(NHFunc(parameter1))
> ....
>  if(NHFunc(parameter2))
>      ............
> .....
>
> }
>
> NHFunc(parameter para)
> {
>   IList<Table1> results = session.CreateCriteria(typeof(Table1))
>                .Add(Expression.Eq("Property1", para))
>                .List<Table1>();
>            return results.count>0;
> }
>
> My Application invokes  Func1() -1st time with a uniqueID -ObjId1
> pointing to Table1 and i get expected o/p.
> when My Application invokes Func1() -2nd time with different uniqueID -
> ObjId2 pointing to Table1  and i get expected o/p.
> but when My Application invokes Func1() -say 3rd or 4th time with
> uniqueID -ObjId1 pointing to Table1  and i get Error
>
>
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to