Hi, Thank for your reply and help. My project uses MS Access database. I did not find NHibernate Jet drivers for NHibernate 3.3 on the web. All I found latest was NH Jet driver v2.0.0.1001 on the Richard's blog at below link. http://coderead.wordpress.com/2010/10/20/nhibernate-jet-driver/ Richard's compiled version of NH Jet drivers supports NHibernate v.2.1.0.4000 only. That's the reason I have choosen to update to NH 2.1. Please suggest, if I'm missing something or if there are NH Jet drivers for v3.3. Also, please point me to any articles that explain how to upgrade from older version to newest versions of NH. Its nice NH experts throw something for beginers like me. *Issue after upgrading to 2.1:* Software uses MS Access mdf files as input files and store all the data in different tables. Once after I converted the project and try to open an mdb file other than defult file linked in Data Source, software fails to switch profile to open different mdb file until I place default source file specified in data source to open file directory. It use to work fine in the previous version NH 1.x. <property name="connection.connection_string"> Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\mydb.mdb</property> software failing at below line with the error, can not find mydb.mdb file. this._nhibernateFactory = this._nhibernateConfiguration.BuildSessionFactory(); *my code looks like below:* public bool InitDatabase(String strDatabasePath) { if (!File.Exists(strDatabasePath)) { MessageBox.Show("File: " + strDatabasePath + " does not exist"); return false; } try { SessionFactory sf = SessionFactory.GetInstance(); if (!SessionFactory.SwitchProfile(strDatabasePath)) { MessageBox.Show("Error opening File: " + strDatabasePath); return false; } } return true; } SessionFactory.GetInstance(); make call to SessionFactory private SessionFactory() { log4net.Config.XmlConfigurator.Configure(); RegisterCoreClasses(null); } private void RegisterCoreClasses(string profilePath) { try { Configuration config = new Configuration(); this._nhibernateConfiguration = config.Configure(); //read NHibernate settings from hibernate.cfg.xml config.Properties = UpdateCfgProperty(profilePath, config.Properties); this._nhibernateFactory = this._nhibernateConfiguration.BuildSessionFactory(); //getting error at this line can't find file mydb.mdb. If this default file exists in file open directory, software switches to opened file with no issues. CloseSession(); } } Appreciate if you have inputs on how to fix this issue. Please reply me, if I need to post some detailed code. Thank you again.
-- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/YfPtUlSSzvAJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
