.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Database Login

1 REPLY 1
Reply
Message 1 of 2
straussm
329 Views, 1 Reply

Database Login

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

1 REPLY 1
Message 2 of 2
hgasty1001
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

 


 


 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost