Friday, February 24, 2012

Can't make relation when Defining a Data Source View

I want to set the relation between two table when I defining a data source
view.
The type primary key is int and the forgien key is int32, then the relation
can't set.
They are all int type but just with different length.
How can I do?On Nov 24, 11:01 pm, "ad" <fly...@.wfes.tcc.edu.tw> wrote:
> I want to set the relation between two table when I defining a data source
> view.
> The type primary key is int and the forgien key is int32, then the relation
> can't set.
> They are all int type but just with different length.
> How can I do?
I'm not sure if I am following you correctly; however, in terms of
referential integrity (i.e., primary key to foreign key relationships)
the data types have to match quite closely. You could try casting one
of the fields to the other to make them match, of course, this may not
resolve your issue. Otherwise, you might want to change the datatype
of one of the fields to the other and use a constraint, etc to enforce
the original integer length. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

No comments:

Post a Comment