By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,916 Members | 1,286 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,916 IT Pros & Developers. It's quick & easy.

Getting started: NHibernate + SQLExpress

P: n/a
Hello all,

I'm trying to write a simple program, using VS C# 2005 Express and SQL
Server Express with NHib 1.0.2. No matter what I try, I'm unable to

cannot open connection
at NHibernate.Impl.SessionFactoryImpl.OpenConnection( )
at NHibernate.Impl.SessionImpl.get_Connection()
at NHibernate.Transaction.AdoTransaction.Begin(Isolat ionLevel
Below is my configuration, which seems straightforward to me.

<add key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvi der"/>
<add key="hibernate.connection.driver_class"
<add key="hibernate.connection.connection_string" value="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|
\testdb.mdf;Integrated Security=True;Connect Timeout=30;User
<add key="hibernate.connection.isolation" value="ReadCommitted" />
<add key="hibernate.dialect"

"testdb.mdf" is the db file I created. For my connection string, I'm
actually using what VStudio itself generated, when I created a form
with a DataGridView on the same database. The DGV populated just fine,
but the same connection string in NHib seems to give me problems.

Does anyone have NHib + SQLServerExpress working locally?


Feb 19 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.