Get current schema at runtime

5 posts, 1 answers
  1. Ashley
    Ashley avatar
    30 posts
    Member since:
    Nov 2012

    Posted 12 Mar 2013 Link to this post

    Hi,

    We have a database in which certain tables will have their amount of columns change occasionally. Is there any way for us to use OpenAccess to get the current DB schema at runtime so that we know what artificial properties to create?

    Thanks
    Ash
  2. Answer
    Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 12 Mar 2013 Link to this post

    Hi Ashley,

    I have prepared a sample application which demonstrates how to use the OpenAccess ORM Schema Reading API to obtain the needed information from the database.

    You could filter the schemas and the relational items to be read from the database using the SchemaReadParameters instance. The ISchemaReader.GetSchema(parameters) method populate a MetadataContainer based on the obtained schema.

    Hope that helps.


    Greetings,
    Damyan Bogoev
    the Telerik team
    OpenAccess ORM Q1 2013 is out featuring Multi-Diagrams, Persistent Data Stream Support and much more. Check out all of the latest highlights.
  3. DevCraft banner
  4. Ashley
    Ashley avatar
    30 posts
    Member since:
    Nov 2012

    Posted 12 Mar 2013 Link to this post

    Hi Damyan,

    Thanks for the response. It works exactly as we need.

    Is this available through your documentation? I did a lot of searching and could not find anything about this except this post.

    Thanks,
    Ash
  5. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 12 Mar 2013 Link to this post

    Hello Ashley,

    I am afraid this feature is not documented yet. We will consider as a future improvement in the product's documentation.

    Should you have any other questions, do not hesitate to contact us back.

    All the best,
    Damyan Bogoev
    the Telerik team
    OpenAccess ORM Q1 2013 is out featuring Multi-Diagrams, Persistent Data Stream Support and much more. Check out all of the latest highlights.
  6. Ashley
    Ashley avatar
    30 posts
    Member since:
    Nov 2012

    Posted 12 Mar 2013 Link to this post

    Thanks again for the quick feedback Damyan.
Back to Top
DevCraft banner