.NET

Reply
Member
milos.stojic
Posts: 5
Registered: ‎05-12-2011
Message 1 of 2 (142 Views)

Can not create ConnectionIdentifier.Oracle from a windows service

142 Views, 1 Replies
01-27-2014 03:25 AM

I have a  windows service that works fine referencing Map 2010's dlls

I need to upgrade the service to Map 3D 2012

 

I am using only Topobase.Data in references

 

Basically the problem is in creating SySConnection

This is code from service for 2010 version :

 

  TopobaseAPI.Data.Sys.SysConnection sysConnection = new TopobaseAPI.Data.Sys.SysConnection(sysusr, syspwd, dataSource, false);
  sysConnection.Open();

but constructor for SysConnection, that is used here, is obsolete in 2012 and error says that I should use ConnectionIdentifier class

So I changed code  to this:

 

 ConnectionIdentifier.Oracle sysIdentifier = ConnectionIdentifier.Create<ConnectionIdentifier.Oracle>();
 sysIdentifier.UserName = sysUser;
 sysIdentifier.Password = sysPassword;
 sysIdentifier.ServiceName = dataSource;
 Topobase.Data.Sys.SysConnection sysConn = new Topobase.Data.Sys.SysConnection(sysIdentifier);
 sysConn.Open();

 

but now the first line of code ( ConnectionIdentifier.Oracle sysIdentifier = ConnectionIdentifier.Create<ConnectionIdentifier.Oracle>():smileywink: creates this error

 

Specified argument was out of the range of valid values.
Parameter name: T

 

This is the list of dlls thet service is using in it's bin folder. They were automatiaclly copied from \AutoCAD Map 3D 2012\bin folder during building.

Antlr3.Runtime.dll

Autodesk.CER.XMLStack.dll

log4net.dll

Topobase.CER.dll

Topobase.Collections.dll

Topobase.Config.dll

Topobase.Data.dll

Topobase.Exception.dll

Topobase.ExceptionDialog.dll

Topobase.Genuine.dll

Topobase.Graphic.dll

Topobase.Graphic.XmlSerializers.dll

Topobase.Math.dll

Topobase.PlaneGeometry.dll

Topobase.Services.dll

Topobase.SpaceGeometry.dll

Topobase.TbpReader.dll

Topobase.Tools.dll

Topobase.Tracing.dll

 

 

 

New Member
nallanp
Posts: 1
Registered: ‎08-12-2014
Message 2 of 2 (35 Views)

Re: Can not create ConnectionIdentifier.Oracle from a windows service

08-12-2014 10:47 AM in reply to: milos.stojic

Hi Milos

 

Did you get a solution for this? I am also trying to migrate code from Topobase 2011 to Map3D 2015, which has a windows service and I am getting the same exact error. Could you resolve this?

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.