0

I am trying to connect to a Sage 100 COM object from ColdFusion. ColdFusion is on one machine and Sage and the other COM object is on another. How do I set up the credentials so that ColdFusion can gain access to the COM object on the Sage machine. The code that I have is currently:

<CFOBJECT ACTION="CONNECT" 
  CLASS="pvxcom.exe" 
  NAME="SageConnection" 
  CONTEXT="remote" 
  SERVER="\\sage">

Update from Comments:

I am using ColdFusion 9 and the error message I am receiving is:

An exception occurred when instantiating a COM object. The cause of this exception was that: coldfusion.runtime.com.ComObjectInstantiationException: An exception occurred when instantiating a COM object.

Community
  • 1
  • 1
  • What version and flavor (bitness) of ColdFusion are you running? If I remember correctly, 64bit ColdFusion does not support COM objects. Also it would help if you provided the error message or some sort of detail as to why this is not working for you. – Miguel-F May 14 '15 at 11:40
  • Sorry about that. I am using ColdFusion 9 and the error message I am receiving is: An exception occurred when instantiating a COM object. The cause of this exception was that: coldfusion.runtime.com.ComObjectInstantiationException: An exception occurred when instantiating a COM object.. – user3797770 May 14 '15 at 13:17
  • As @Miguel-F told, did you check the ColdFusion architecture? Is it 32 bit or 64 bit? – Pankaj May 14 '15 at 14:05
  • Yes, I am using ColdFusion 9 64 Bit. I do have access to ColdFusion 11 as well. Could it work for ColdFusion 11? – user3797770 May 14 '15 at 15:37
  • It is not the ColdFusion version (9 or 11) that is the problem. It is the architecture. ColdFusion 64 bit does not support COM objects. I believe the 32 bit version does though. – Miguel-F May 14 '15 at 16:20

1 Answers1

1

You are running a 64-bit version of ColdFusion which does not support COM objects. Really I think it goes down to the 64-bit OS not playing well with COM objects either. Anyway, if the COM object is required for you I think you will need to install the 32-bit version of ColdFusion and perhaps on a 32-bit version of your operating system.

I believe this goes back to the ColdFusion 8 days (the first ColdFusion version that included a 64-bit option). In fact I found this in an old ColdFusion 8 article:

Most of the functionality and features of ColdFusion run just fine on 64-bit platforms, however, certain features like ColdFusion COM interoperability, ColdFusion Delphi interoperability, and Microsoft Access database connectivity do not work on a ColdFusion 64-bit platform.

My emphasis on the COM statement

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
  • @user3797770 - As Miguel-F said, it is definitely not supported with CF9 64-bit (or earlier). If you have CF11, try it there. I have not tried this, but *supposedly* they added ["*...support for ...64-bit COM interoperability*"](http://blogs.coldfusion.com/post.cfm/coldfusion-10-update-11-an-update-with-50-fixes) as of CF10 update 11. – Leigh May 17 '15 at 17:46