I have an automation project that I use for several similar sites.
The databases of the sites are also similar beside the USERS
table.
In one database the table USERS
has the column Fname
, in the other one this column is not present. In the other database I have a column named RegesrationDate
and in others this column is not present. etc. etc.
When I am running a query I get the error
specified cast is not valid.
because I can't cast the return value (which has more columns then I am holding in my dbml
file).
There is a way in my project to make a generic dbml
object that I will run:
SELECT * FROM USERS
and to get a normal object. Do you have other ideas how to make my project work?