.NET

Reply
Member
straussm
Posts: 3
Registered: ‎06-22-2012
Message 1 of 2 (131 Views)

Database Login

131 Views, 1 Replies
06-22-2012 03:34 AM

I am working on an application which uses an oracle database as backend. The aplication uses a login dialog in

 

 void IExtensionApplication.Initialize()

so my application knows the credentials for the oracle database. I use a a drawing-template which has a databaselink in it. This points to a UDL-file  in 'Data Linls'. If i add the Credentials to this file and set the Parameter Persist Security Info=True the Credentials are ignored. So i thought i can avoid the additional loginprocesses if I add the following code:

var acadApp = (Autodesk.AutoCAD.Interop.AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
dynamic caoConnect = acadApp.GetInterfaceObject("CAO.DBConnect.16");
caoConnect.Connect("myconnection.UDL""username""password"false);

 

If i dont execute the code above i need two logins for the new drawing. After I added the code to my application I still need one oft this.

 

Can somebody lead me to the point where the second login comes from. I use AutoCAD Map 3D 2012. Maybe someone has already explained the problem, in this case please led me to the corresponding thread.

 

best regards

Markus Strauss

Valued Mentor
gasty1001
Posts: 449
Registered: ‎04-11-2010
Message 2 of 2 (114 Views)

Re: Database Login

06-22-2012 10:59 AM in reply to: straussm

Hi,

 

It seems that there are 2 connections and so 2 credentials are needed, may be one for CAO and the one for ADO.NET or FDO if you are using it. I don't know if the two connections are required for your workflow, but it's not uncommon if you need to access 2 different kind of data on 2 different datasources.

 

Persist Security Info=True , only means that the credential info it's retained after the connection is established, and so you can recover that info from the connection, usually you set it to false for security. But the credentials are needed every time you need a connection, no matter if it's set to true or false.

 

Gaston Nunez

 


 


 

 

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community