Access Relationships

Posts   
 
    
davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 12-Sep-2005 18:44:33   

Frans (and all),

Does the join type on an Access Database in the Relationship screen effect the way LLBLGen pro generates the entities? i.e. If I choose option 1,2 or 3 (Choose all records from x and only records from y, etc) in Access for the join type of a table does LLBLGen pro generate different stuff or does it completely ignore the relationship types in Access?

Hope I got that right and you understand, rushing to get out of the door.... frowning

Geoff.

Ps. Don't know if this is a 'Generated Code' question so forgive me if it is.

taylor74
User
Posts: 59
Joined: 06-Oct-2004
# Posted on: 12-Sep-2005 20:21:56   

I think what that does is set up default join types when creating new queries in Access so that you don't have to define (inner, left, right) each time you create a new query in the Query Designer that uses those tables.

Jeff

davisg avatar
davisg
User
Posts: 113
Joined: 27-Feb-2005
# Posted on: 12-Sep-2005 23:53:09   

taylor74 wrote:

I think what that does is set up default join types when creating new queries in Access so that you don't have to define (inner, left, right) each time you create a new query in the Query Designer that uses those tables.

Jeff

Thanks Jeff, so does that mean LLBLGen Pro ignores what type they are (inner, left and right) and just uses them to generate relationships?

I think what I am really asking here is does LLBLGen Pro really care about what type of join I specify in the Relationship screen of Access. I think i'm right in thinking that it uses the relationships in Access to determine relationships but I might be wrong there.

Geoff.

taylor74
User
Posts: 59
Joined: 06-Oct-2004
# Posted on: 13-Sep-2005 00:52:55   

davisg wrote:

I think what I am really asking here is does LLBLGen Pro really care about what type of join I specify in the Relationship screen of Access. I think i'm right in thinking that it uses the relationships in Access to determine relationships but I might be wrong there.

Geoff.

Frans can probably confirm this, but I don't think the Access OLE DB driver has access to all the settings created by the Access GUI and vice versa. I did find the following quote in a Microsoft article.

Note When you use OLE DB, there is no way to create a relationship that is not enforced, therefore there is no equivalent in ADOX to the DAO dbRelationDontEnforce setting of the DAO Attributes property of a Relation object. Also, ADOX and the Microsoft Jet 4.0 OLE DB Provider don't provide a way to specify the default join type that will be used in the Access query Design view window, as can be done by using the dbRelationRight and dbRelationLeft settings of the Attributes property.

That last part makes me think if there is no way to create a relation with default join type using OLE DB, then there isn't any way to read the default join type. To bad, that would be a neat way to automatically set up the join hint when creating typedlists.

Jeff

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 13-Sep-2005 08:32:54   

LLBLGen Pro only cares about the FK, between which tables its defined and which fields are involved. It's a native Access phenomenon that you can specify a left join on a relationship, which, quite frankly, doesn't make any sense, only in queries. (but there's more in access that doesnt make any sense wink )

Frans Bouma | Lead developer LLBLGen Pro