473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Getting started: NHibernate + SQLExpress

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

Feb 19 '07 #1
0 4867

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Hearn | last post by:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current...
3
by: Doug T. | last post by:
OK. Just ordered VS2005 Pro. to make the transition from VB6. A commercial application needs to be converted from VB6. Currently it is a multi-formed app that communicates to an many-tabled...
0
by: Aquila Deus | last post by:
The documents on their website are completely wrong. Following is the a real example that works with NHibernate 1.0.2.0: <?xml version="1.0" encoding="utf-8"?> <configuration...
1
by: erin.sebastian | last post by:
Hello All, I am new to hibernate and new to nHibernate. I created a small app and when i try and run it i get the error i posted at the bottom of this message. I am using the helper class that...
5
by: gaddoz | last post by:
Hi all, I'm trying to set up a .NET webservice using in data access layer Nhibernate (nhib 1.2.0 beta). The first trouble I met was that a webservice cannot serialize Interfaces, like IList<>....
0
by: TigrouMeow | last post by:
Hello, I'm trying to make a "clean" webservice, using Nhibernate. I'm facing some issues, but i'm quite the beginner with that kind of system. When there are more than 2 clients connected on my...
0
by: Pieter | last post by:
Hi, I'm using NHibernate 1.2 (CR1), and I'm using a custom list (inherited from BindingList(Of T) ) for all my lists. The NHibernate documentation told me that I had to implement...
4
by: IceMan | last post by:
Hi, I am using the configuration object and passing it a Assembly object to load. The assembly object i pass in is from a dll which is in a different folder then the Nhibernate dll. The...
14
by: thj | last post by:
Hi, I was wondering what you guys are using and why? LINQ to SQL or NHibernate? Thanks in advance, Tommy
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.