But as far as I know it won't be possible because if I reverse map the database OA code assumes that table names will be always the same. So when I'll have table MyCompany_MyModule, the code will assume that the table will always be named this way.
Any ideas how to use open access and still be able to use standard table installation?
Thank you for any input.
Filip
6 Answers, 1 is accepted
If you change your table names - or any other property of your relational model, you should start the "update from database wizard" which will update your mapping with the latest stage of your database model.
All the best,
Zoran
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thank you for response.
I know that. I've been developing with OA for sometime now and I love it.
Maybe I was not clear about my question.
When I develop the module and on my development database I'll have for example dbo.MyTable then, OA will look for this table and everything will be OK if I'll change name I will just use wizard to update changes. Thats not the problem.
But dnn standard for creating tables is CREATE TABLE {databaseOwner}[{objectQualifier}MyTable] so if I want to follow this standard I don't know the final table name, it can be dbo.MyTable or it can be someSchemaName.dnn_MyTable or whatever.
My question is whether is possible to follow this standard or I'll have to use 'fixed' table names so on every installation of mine module the table name will be dbo.MyTable.
I hope I described my question.
Thank you, Filip
dbo.dnn_spGetProducts
Currently OpenAccess has no mechanism of detecting different table names. But you can easily achieve your task by editing the app.config file.
All you have to do is to find the following tag for each class tag and change it, so that it points to the correct table:
<
extension
key
=
"db-table-name"
value
=
"your-table-name-here"
/>
Bear in mind though that these changes will be lost if you update your project with the Reverse Mapping Wizard.
Greetings,
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
It would be cool if I could just put the custom config into the web.config.
You are correct. There is a workaround however. With OpenAccess you can load the XML configuration file dynamically. You will have to modify the Database() method of the ObjectScopeProvider though.
What you have to do is generate a XML file and pass it to one of the constructors of the Database.Get() method. Here is an help article with an example that you can check out.
Greetings,Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.