Let me guess, you did something like import the tables from one database to another. Sorry but by doing that you lost a lot of important things in the database schema like the mp_Pages table has an auto identity column to generate the pageid, indexes, foriegn keys etc are all lost. So now you get this error because its not generating the id.
The only way to move a database and keep it intact is to back it up and then restore it on the new machine. The only other option is to delete every table and stored procedure and then let setup page re-create them, but you will lose all data that way and will be starting with a new site.
Hope it helps,