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

[Solved] Connect per user roled

2 Answers 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ENTERPRISE INTERNATIONAL SAS
Top achievements
Rank 1
ENTERPRISE INTERNATIONAL SAS asked on 19 Jan 2011, 11:14 PM
Hi

I'm trying to use ORM with Oracle database but I have a specific connection scenerio for any user of our software. All software users must exist as user roled (created and granted into database), so for example, there is an ADMIN user that login to our software to access to all options and modules. this user is created into Users table into System schema into our Database, but also must be create by CREATE USER ... as object into database for connection autentication purposes. Is it possible this?

<add name="BDConexionPrincipal" connectionString="Data Source=SOLAR;User Id={UID};Password={PID};" providerName="System.Data.OracleClient"/>

I replace {UID} and {PID} with the user and password login respectively.

My second question related with this is, it is possible via ORM to create users or execute DDL sql instructions?

thanks

2 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 20 Jan 2011, 06:47 PM
Hi Ramiro,

1.    You could instantiate an OpenAccessContext instance providing a custom connection string:

YourContextName context = new YourContextName(connectionString);

2.    I am afraid that you are unable to create new users using Telerik OpenAccess ORM. In fact you could execute a custom sql script using the InitSql setting. With the InitSql backend configuration element you can specify a SQL fragment that is executed when a new connection is opened.
Hope that helps.

Regards,
Damyan Bogoev
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
0
Damyan Bogoev
Telerik team
answered on 28 Jan 2011, 05:06 PM
Hi Ramiro,

Firstly I want to apologize for the inconsistent information in my last answer.
Actually you could prepare and execute custom sql statements. I prepared a sample application which demonstrates how to achieve that goal.
Additional information can be found here, here and here.
Hope you will find the provided information useful.

All the best,
Damyan Bogoev
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
Tags
General Discussions
Asked by
ENTERPRISE INTERNATIONAL SAS
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or