You catch it with the catch statement? How you then handle it it's up to
you.

Or can you be more specific about what specific issue is problematic?

You should dispose the session and transaction if there is an error. In
simple cases, just use the using-statement or try-catch-finally. If this
doesn't fit you case you need to explain more about what you are trying to
do - if you're using some application framework they may have other ways to
manage it.

/Oskar



2016-11-21 6:47 GMT+00:00 Maxim Kovalev <[email protected]>:

> Hi! Thank You for Your answer! Could You please describe me how can I
> handle timeout exception?
>
> пятница, 18 ноября 2016 г., 21:25:44 UTC+3 пользователь Quicoli написал:
>>
>> you can extend that time in you string connection:
>>
>> Data Source=.;Initial Catalog=TestDB; Trusted_Connection=true;Asynch
>> ronous Processing=true; Connect Timeout=120;
>>
>> 2016-11-18 14:24 GMT-02:00 Maxim Kovalev <[email protected]>:
>>
>>> Hi!
>>> We have faced with not-closed transaction on SQL Server.
>>> How can I catch client timeout exception?
>>> for example, default timeout 30s, server needs 35s to perform query.
>>> How I can catch timeout exception and check transaction clothing(if not
>>> - close it)?
>>> Thank You!
>>> (NHibernate 4.0.3.4000)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "nhusers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/nhusers.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/nhusers.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to