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
connect:
cannot open connection
at NHibernate.Impl.SessionFactoryImpl.OpenConnection( )
at NHibernate.Impl.SessionImpl.get_Connection()
at NHibernate.Transaction.AdoTransaction.Begin(Isolat ionLevel
isolationLevel)
(etc)
Below is my configuration, which seems straightforward to me.
<nhibernate>
<add key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvi der"/>
<add key="hibernate.connection.driver_class"
value="NHibernate.Driver.SqlClientDriver"/>
<add key="hibernate.connection.connection_string" value="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|
\testdb.mdf;Integrated Security=True;Connect Timeout=30;User
Instance=True"/>
<add key="hibernate.connection.isolation" value="ReadCommitted" />
<add key="hibernate.dialect"
value="NHibernate.Dialect.MsSql2000Dialect"/>
</nhibernate>
"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?
Thanks,
Taxi