473,805 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 .SessionFactory Impl.OpenConnec tion()
at NHibernate.Impl .SessionImpl.ge t_Connection()
at NHibernate.Tran saction.AdoTran saction.Begin(I solationLevel
isolationLevel)
(etc)
Below is my configuration, which seems straightforward to me.

<nhibernate>
<add key="hibernate. connection.prov ider"
value="NHiberna te.Connection.D riverConnection Provider"/>
<add key="hibernate. connection.driv er_class"
value="NHiberna te.Driver.SqlCl ientDriver"/>
<add key="hibernate. connection.conn ection_string" value="Data
Source=.\SQLEXP RESS;AttachDbFi lename=|DataDir ectory|
\testdb.mdf;Int egrated Security=True;C onnect Timeout=30;User
Instance=True"/>
<add key="hibernate. connection.isol ation" value="ReadComm itted" />
<add key="hibernate. dialect"
value="NHiberna te.Dialect.MsSq l2000Dialect"/>
</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 + SQLServerExpres s working locally?

Thanks,
Taxi

Feb 19 '07 #1
0 4889

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

Similar topics

2
2125
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 web request. Please review the stack trace for more information about the error and where it originated in the code. SQLExpress database file auto-creation error: The connection string specifies a local SQL Server Express instance using a...
3
1070
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 Access db. Stores and keeps track of appointments, people, pictures, etc. Also allows two users to communicate changes to each other using a proprietary db sync (track changes from user 1, send by email, then user 2 will import the information and...
0
2863
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 xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <configSections> <!-- SecurityException is thrown if NHibernate assembly is not in GAC. --> <section name="hibernate-configuration"
1
13713
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 can be found here http://blogs.intesoft.net/simon/articles/16.aspx#36 . Does anyone know why this error might occur.. i have NO IDEA.... if you require anymore information please let me know and i will send it through. Thanks in advance! Erin
5
9573
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<>. After I workarounded it, now I get: System.InvalidOperationException: There was an error generating the XML
0
1795
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 webservice, i get errors. It seems that the connection is dropped. Here is what i get in theWinforms application using the Webservice : Error = {"The underlying connection was closed: An unexpected error occurred on a receive."}
0
3466
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 IUserCollectionType to my custom list, which I did. But I still get an error when trying to read the object: " {"Unable to cast object of type 'NHibernate.Collection.Generic.PersistentGenericBag`1' to
4
3337
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 AddAssembly(Assembly assembly) function throws me an Error saying it can't load the configuration hbm.xml file because it can't load the assembly in the hbm.xml file. Why does NHibernate try to load the Assembly again??
14
3692
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
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10103
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9179
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7644
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6874
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3839
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.