ADOX RelatedColumn Property 
Author Message
 ADOX RelatedColumn Property

Hi everyone,

I have developed an ASP page which dynamically builds a form out of
whichever fields I select from my table.  It is very useful.  What I am
trying to do now is have it automatically populate drop-down combo boxes for
fields which are part of a one-to-many relationship.  I am trying to use the
RelatedTable and RelatedColumn properties to accomplish this.  I am able to
get the RelatedTable property from the "key" object but the RelatedColumn (a
property of the "Column" object) doesn't seem to work according to the
documentation on MSDN.  The following code snippet doesn't work:

<ul><%
For Each adKey in adoxTable.Keys
    Response.Write "<li>" & adKey.Name & "</li><ul>"
    For Each adCol in adKey.Columns
        Response.Write "<li>" & adCol.RelatedColumn & "</li>"
    Next
    Response.Write "</ul>"
next %></ul>

Has anyone else had problems with this property?  I can't seem to get it to
work.



Sat, 26 Nov 2005 23:42:32 GMT  
 ADOX RelatedColumn Property
I did the same thing, except upon finding your error I
took another approach.  I took the information from the
table, read it into a recordset and then populated my drop-
down combo boxes.  I dont know if thats what you're
exactally trying to do, but it worked for me.
Quote:
>-----Original Message-----
>Hi everyone,

>I have developed an ASP page which dynamically builds a
form out of
>whichever fields I select from my table.  It is very
useful.  What I am
>trying to do now is have it automatically populate drop-

down combo boxes for
Quote:
>fields which are part of a one-to-many relationship.  I

am trying to use the
Quote:
>RelatedTable and RelatedColumn properties to accomplish
this.  I am able to
>get the RelatedTable property from the "key" object but

the RelatedColumn (a
Quote:
>property of the "Column" object) doesn't seem to work
according to the
>documentation on MSDN.  The following code snippet
doesn't work:

><ul><%
>For Each adKey in adoxTable.Keys
>    Response.Write "<li>" & adKey.Name & "</li><ul>"
>    For Each adCol in adKey.Columns
>        Response.Write "<li>" & adCol.RelatedColumn
& "</li>"
>    Next
>    Response.Write "</ul>"
>next %></ul>

>Has anyone else had problems with this property?  I can't
seem to get it to
>work.

>.



Sun, 27 Nov 2005 20:19:38 GMT  
 ADOX RelatedColumn Property
What I am trying to do it populate related fields with records from the
table they are related to.  For example, when filling out an address the
"State/Province" field would be a combo box with US and Canadian provinces.
What exactly did you manage to do?  it sounds like you accomplished what I
was trying to do.

Thanks,

Ken.


Quote:
> I did the same thing, except upon finding your error I
> took another approach.  I took the information from the
> table, read it into a recordset and then populated my drop-
> down combo boxes.  I dont know if thats what you're
> exactally trying to do, but it worked for me.
> >-----Original Message-----
> >Hi everyone,

> >I have developed an ASP page which dynamically builds a
> form out of
> >whichever fields I select from my table.  It is very
> useful.  What I am
> >trying to do now is have it automatically populate drop-
> down combo boxes for
> >fields which are part of a one-to-many relationship.  I
> am trying to use the
> >RelatedTable and RelatedColumn properties to accomplish
> this.  I am able to
> >get the RelatedTable property from the "key" object but
> the RelatedColumn (a
> >property of the "Column" object) doesn't seem to work
> according to the
> >documentation on MSDN.  The following code snippet
> doesn't work:

> ><ul><%
> >For Each adKey in adoxTable.Keys
> >    Response.Write "<li>" & adKey.Name & "</li><ul>"
> >    For Each adCol in adKey.Columns
> >        Response.Write "<li>" & adCol.RelatedColumn
> & "</li>"
> >    Next
> >    Response.Write "</ul>"
> >next %></ul>

> >Has anyone else had problems with this property?  I can't
> seem to get it to
> >work.

> >.



Fri, 02 Dec 2005 21:23:21 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ADOX (ActiveConnection Property)

2. ADOX and Jet DB field properties

3. ADOX and Field Properties

4. MS Access table properties & ADOX

5. how to get field property by using ADOX object

6. How to set Format property in ACCESS2k thru ADOX using JET OLEDB 4.0 provider

7. ADOX, Access 2000 and Jet OLEDB property settings

8. Set Default Property of Column Object Using ADOX

9. ADOX: Jet Oledb 4.0: How to set Format property for a column

10. How to set the required property in access databases via adox

11. Adox and required property

12. Adox Index Properties

 

 
Powered by phpBB® Forum Software