-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 
Author Message
 Post subject: Mapping and Configuration files
PostPosted: Tue May 24, 2005 4:26 am 
Hello,
I'm using NHibernate with Visual Studio. I've added the reference to NHibenrnate.dll and created the class, the mapping and the configuration file.
Now, i want juste to know where have i to place the mapping and the configuration files??

Thanks


Top
  
 
 Post subject: More details
PostPosted: Tue May 24, 2005 9:22 am 
When i try to insert an element to database i execute the following code :

[code]using System;
using NHibernate;
using NHibernate.Cfg;
namespace NHibernateTest
{
/// <summary>
/// Description r


Top
  
 
 Post subject:
PostPosted: Tue May 24, 2005 9:13 pm 
Regular
Regular

Joined: Mon May 16, 2005 2:15 pm
Posts: 59
Your configuration needs to be for the app Windows/Webform of the project you are running's folder, not in the hibernate folder.


Top
 Profile  
 
 Post subject: More explanation
PostPosted: Wed May 25, 2005 3:31 am 
Hello,
Thank u for replaying, but i don't see what you mean? can you give me more details please ? i'm juste beginner.

Thanks
Regards


Top
  
 
 Post subject: suit
PostPosted: Wed May 25, 2005 4:56 am 
Please, juste tell me where have i to put the configuration file (NHibernate.cfg.xml) in the project and where have i to put the MySQL-connector-net ??
i think that is my problem and it making me very nervous :(


Top
  
 
 Post subject:
PostPosted: Wed May 25, 2005 8:40 am 
Beginner
Beginner

Joined: Thu May 12, 2005 3:41 am
Posts: 24
Location: London, UK
Hi

The best option is to add the file to your project and rename it to App.config. When you build the project, App.config is copied to the target directory an renamed to <exename>.exe.config (where <exename> is the name of your executable), and this is where NHibernate picks up the configuration from by default.

As for the MySQL Connector, you just need to add a reference to it in your project and ensure that the Copy Local property for the reference is set to true.


Top
 Profile  
 
 Post subject: next
PostPosted: Wed May 25, 2005 9:24 am 
Thank you very much for your advise!!

Now i have done what you told me (renaming configuration file and adding reference to MySql.Data.dll and puting local Copie to True)

Things have effectively changed but now i got an other problem :
The following message when i execute with debuging:

Code:
'NHibernateTest.exe' : downloaded 'c:\documents and settings\stagevirt1\mes documents\visual studio projects\nhibernatetest\bin\debug\iesi.collections.dll', no symbole downloaded .

'NHibernateTest.exe' :
downloaded 'c:\winnt\assembly\gac\mysql.data\1.0.4.20163__c5687fc88969c44d\mysql.data.dll', no symbole downloaded

'NHibernateTest.exe' : downloaded 'c:\documents and settings\stagevirt1\mes documents\visual studio projects\nhibernatetest\bin\debug\hashcodeprovider.dll', no symbole downloaded

'NHibernateTest.exe' : downloaded 'c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', no symbole downloaded
Le programme '[3084] NHibernateTest.exe' was stopped with the code 0 (0x0).


without debuging i got :

Code:
log4net:ERROR DOMConfigurator: ConfigureFromXML called with null 'element' param
eter
Begin failed with SQL exception
Press any key to continue


regards


Top
  
 
 Post subject: help
PostPosted: Thu May 26, 2005 4:13 am 
Please, Some one has an idea ?? i really don't know what to do i'm blocked :cry:

Thanks


Top
  
 
 Post subject: are assemblies referenced?
PostPosted: Thu May 26, 2005 7:04 am 
Hi,

Have you referenced the NHibernate assemblies in your Visual Studio project? Right-click on the "References" folder of your project in Visual Studio, say "Add Reference..." and add all of the NHibernate DLLs to your project.

Or maybe I'm totally wrong and you've already done this :)


Top
  
 
 Post subject:
PostPosted: Thu May 26, 2005 8:33 am 
Thank u for your replies!
i effectively have already done what you told me!! i think the problem belong the connector.which one do u use??


Top
  
 
 Post subject: connector
PostPosted: Sat May 28, 2005 4:36 pm 
My question is to all Nhibernate users. It's about The Mysql-connector . net

Which one are u using and how do u use (configure ) it in VS .Net 2003

I think it's a basic thing for those who could work with NHibernate

Thank u


Top
  
 
 Post subject:
PostPosted: Sun May 29, 2005 7:19 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Try increasing logging level to INFO or DEBUG and post the output here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.