Exposing a Native Database View in a Schema
Concept Procedure
 
 
 
NoteThis procedure is needed only for FDO-enabled schemas. For existing schema data stores, AutoCAD Map 3D automatically displays the view as a feature class, with no further action on your part.

To create a feature class that maps to a database view

  1. Create an FDO-enabled data store.

    You can use the Schema Editor to do this. See Creating a Schema

  2. Create a database view using the native tools for your database.

    For Oracle, use sqlplus. For SQL Server, use sqlcmd. For MySQL, use mysql.

  3. Reconnect to the data store in AutoCAD Map 3D.
  4. In the Schema Editor, select the target schema Name and click New Feature Class.

    For information about creating feature classes and properties, see Editing a Schema.

  5. If the Logical Feature Class tab is displayed, click the Physical Configurations tab.
  6. For Table Name, type the name of the view you created in step 1. Click OK.
  7. Switch back to the Logical Feature Class tab and type the name, class type, and other required information.
  8. Click New Property to add a property.
  9. Switch to the Physical Configuration tab.
  10. Type the name of the view column (from the view you created in step 1) to map to the new property. Click OK.
  11. Switch back to the Logical Property tab and set the property attributes.

    Attributes such as data type, length, scale, precision, nullability, uniqueness, and other constraints must match the corresponding column attributes. For example, you cannot create a property that has the string data type and map it to a column that uses the number data type.

  12. Repeat steps 8 through 11 to create the remaining properties.
  13. Be sure to fill in the Primary Key column for the new view record before you check it in (if it is not defined to be auto-generated).