Where clause in table mappings causes unhandled SQLException
airvine
Posts: 5
Hello,
I'm writing a database comparison and migration application that needs to filter the databases based on user input.
I iterate through the source database Tables collection and build a list of tables that reference my base table in a foreign key. Then for each of the tables found in this manner I create a tablemapping object using the tablemappings.join method. I then apply a where clause to each of these mappings and add the mapping to the mappings collection that is passed to currentSession.CompareDatabases(dbSource, dbDest, mappings). This call (even inside of a try block) will cause an unhandled SQLException to be thrown.
If I omit the where clause from the table mappings the code executes fine.
Any thoughts?
Thanks,
Al
I'm writing a database comparison and migration application that needs to filter the databases based on user input.
I iterate through the source database Tables collection and build a list of tables that reference my base table in a foreign key. Then for each of the tables found in this manner I create a tablemapping object using the tablemappings.join method. I then apply a where clause to each of these mappings and add the mapping to the mappings collection that is passed to currentSession.CompareDatabases(dbSource, dbDest, mappings). This call (even inside of a try block) will cause an unhandled SQLException to be thrown.
If I omit the where clause from the table mappings the code executes fine.
Any thoughts?
Thanks,
Al
Comments
I've sent you an email requesting some further information which will help us investigate this problem.