Subject RE: [IBO] SchemaForeignKeyInfo
Author Jason Wharton
Ryan,

> In my mind there is something wrong with this procedure.
>
> Here is where things start to fall apart for me:
>
> if TargetRelationNames then
> ForeignKeys.Add(IB_Connection.mkVARIdent(Fields[0].AsString)+',' +
> IB_Connection.mkVARIdent(Fields[1].AsString))
> else
> ForeignKeys.Add(IB_Connection.mkVARIdent(Fields[0].AsString)+',' +
> IB_Connection.mkVARIdent(Fields[1].AsString));
>
> Shouldn't I expect a different results depending on the value of
> TargetRelationNames?
>
> Having said that I don't get the information I'm expecting anyways.
>
> When I specify the Table name shouldn't I get back the FKColumn name
> and the table name that contains the PKColumn??
>
> Currently I always get back the FKColumn name and the Table name that
> I passed into the procedure.
>
> While I am looking for the Foriegn keys of the specified table, I'm
> kinda looking for the Primary key table name as well. Am I wrong in
> my assumption on what this procedure is supposed to do?

Possibly not, because the SQL could have been modified.
Obviously this code is non-sense at least in the sense that some changes
that were necessary removed the distinction between the two cases.

I'll review this more closely to be sure it isn't a problem.

What led you to make this discovery?

Jason Wharton