I am working on an application which uses an oracle database as backend. The aplication uses a login dialog in
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.
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.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register