• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD Map 3D

    Reply
    *M.

    Linking two tables within defining query dialog

    92 Views, 1 Replies
    11-26-2002 10:15 PM
    I'd like to create query base on two tables. First table is linked to
    drawing object (Link Template) and second table contained some data which I
    would like to use for query criteria.
    I didn't find clear example about this question in Map Help or in Knowledge
    base.
    Could I link object data table with external database.

    I'm using Map 5 and Access 97 mdb tables.

    Some example or suggestion?

    Milos
    Please use plain text.
    *Crichton, Will

    Re: Linking two tables within defining query dialog

    12-03-2002 12:45 AM in reply to: *M.
    If you create a view (join relationship) within your database software that
    links the two tables you will be able to perform a query against the linked
    data. This is a little tricky as the link template references a specific
    table name and that table name is stored with the link template definition
    in your drawings. Redefining the link template can be tricky/impossible or
    just plain time consuming... However it is pretty easy to redirect Map to a
    different set of data by renaming your database tables (temporarily)

    Try the following:

    Table1 is the main table linked to your drawing.
    Table2 is the related table.
    Join1 is the relational structure that contains columns from both tables.

    From within your database software...
    Rename Table1 to TableX.
    Rename Join1 to Table1
    From Map...
    Connect to the datasource
    Perform your query process
    From within your database software...
    Rename Table1 back to Join1.
    Rename TableX back to Table1

    Hope this helps,
    Will

    "M." wrote in message
    news:AACC5118F353C62E917DAE56342D4105@in.WebX.maYIadrTaRb...
    > I'd like to create query base on two tables. First table is linked to
    > drawing object (Link Template) and second table contained some data which
    I
    > would like to use for query criteria.
    > I didn't find clear example about this question in Map Help or in
    Knowledge
    > base.
    > Could I link object data table with external database.
    >
    > I'm using Map 5 and Access 97 mdb tables.
    >
    > Some example or suggestion?
    >
    > Milos
    >
    >
    Please use plain text.