This is a migrated thread and some comments may be shown as answers.

Get current schema at runtime

4 Answers 53 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ashley
Top achievements
Rank 1
Ashley asked on 12 Mar 2013, 08:30 AM
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

4 Answers, 1 is accepted

Sort by
0
Accepted
Damyan Bogoev
Telerik team
answered on 12 Mar 2013, 10:26 AM
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.
0
Ashley
Top achievements
Rank 1
answered on 12 Mar 2013, 12:09 PM
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
0
Damyan Bogoev
Telerik team
answered on 12 Mar 2013, 12:19 PM
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.
0
Ashley
Top achievements
Rank 1
answered on 12 Mar 2013, 12:22 PM
Thanks again for the quick feedback Damyan.
Tags
Development (API, general questions)
Asked by
Ashley
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Ashley
Top achievements
Rank 1
Share this question
or