This project is read-only.

Problems importing database

Apr 5, 2012 at 5:51 PM


I downloaded the latest install on 3/27.  I've been trying to import an existing SQL 2005 database into the empty model I've created and I have not been having much luck.

What I am doing is:

Opening the model.

Going into the designer window.

Right clicking and selecting Model->Import Database...

I add a valid connection and hit next.

What I get is the importing.. window and then nothing.  It drops back to the designer with nothing there.  Is there something I can check somewhere like a log file to see why it failed?


Shishir Ghate

Apr 8, 2012 at 4:24 AM

I have seen this issue. Could you send your database schema script to A new version will be posted soon and I just want to make sure this is resolved.

May 17, 2012 at 12:25 PM
Edited May 17, 2012 at 12:45 PM


I'm having a similar issue with SQL 2008 R2 and latest version of nHydrate (   Importing......  and then nothing.


  • Check Updates indicates "...there is a newer version available (unknown). Download at...", but the website doesn't show the full build number only (5.0), so I downloaded again, only to find it is still the same version I have.
  • Unable to register - "There was an error trying to register. Please visit the main nHydrate site to register:".  But there is no registration at this site.

So still having Database Import issue even after a new download and install (well repair).

I've had a play around with it.  And read the articles on CodeProject, although some are a bit old now.  I love it.  Not only is it what Entity Framework is missing, but the model designer is soo much easier to use.

Just a small feature addition that will make life easier on the model designer, is the ability to Cut/Copy/Paste fields between tables/entities.  And change datatypes directly on the table rather than on the properties tab.

I've forwarded you a copy of my schema for your reference.

May 17, 2012 at 2:05 PM

Dean, would you mind generating and sending your database schema to me at There might be some odd thing in the schema that is causing a problem. If you would just send the schema to me I can test this theory.

May 19, 2012 at 3:14 AM

This issue has been resolved and will be in the next release.

Jul 9, 2012 at 12:40 PM


I have the exact same problem using version 5.1.  I am trying to import an old legacy database some part of which must be causing a problem and I think it is because the legacy database uses multiple schemas with the tables.

To rule out any server issues I added a test database with one table to the same database server and trying to import this opened the Choose Objects window with no problem.  I then added a second table using a new schema and this time trying to import with nHydrate dropped me to the designer with no message.

Jul 9, 2012 at 12:51 PM


My particular problem was solved as I had unintentionaly created a Primary Key (PK) column that had the same name as the table.  I normally name my PK columns the same as the the table name with a suffix of ID.  Eg: a Customer table would have a CustomerID PK.

So if this isn't the case, the I suggest you email the database schema to to have a look it.  Chris was really quick in resolving this for me.


Jul 9, 2012 at 3:10 PM

Philip if you are having issues importing a database, would you send to me the schema file or the whole database please.

Jul 31, 2012 at 3:12 PM



Sorry for the delay in coming back to this, my main project is for the Olympics so kind of takes priority just now :-)

I have worked out what is going wrong for me - it is because I have some functions created using a schema different to dbo.

To reproduce, run this SQL on a database that you can currently "import database" from:



	CREATE FUNCTION [dbo].[test_func] (@input int)



	CREATE FUNCTION [rptwiz].[test_func2] (@input int)




The import will now not work.  Drop the second function and the import will work again.  

Having tables with the same name but under different schemas also breaks the database import.  I guess schema support is something for guys to look at sometime!

That said, now that I know what the problem is I can work around this so not an urgent bug for me.

Many thanks.

Aug 2, 2012 at 12:46 AM

You are correct. I have reproduced this and it is corrected. This will be in the next version.