3 Replies Latest reply on Apr 16, 2008 6:23 AM by advancesolutions

    CF equivilent to asp.net

    advancesolutions
      i have a page in asp.net (vb) that references external data objects (dll file in the bin folder) and i wondered if it is possible to do in coldfusion, i would assume javascript would be the only option. it is sage data objects and here is a preview of the code in vb.net.
      Dim oSDO As SageDataObject130.SDOEngine
      Dim oWS As SageDataObject130.Workspace
      sage say any language that supports COM objects will work, so does javascript and how to you add a reference to a dll or tlb file?
        • 1. Re: CF equivilent to asp.net
          Level 7
          advancemal wrote:
          > i have a page in asp.net (vb) that references external data objects (dll file
          > in the bin folder) and i wondered if it is possible to do in coldfusion, i
          > would assume javascript would be the only option. it is sage data objects and
          > here is a preview of the code in vb.net.
          > Dim oSDO As SageDataObject130.SDOEngine
          > Dim oWS As SageDataObject130.Workspace
          > sage say any language that supports COM objects will work, so does javascript
          > and how to you add a reference to a dll or tlb file?
          >


          ColdFusion has the <object ...> tag and createObject() function that can
          both be used to run com objects. ColdFusion can also execute command
          line syntax with the <cfexecute...> tag.

          I am not familiar enough with ASP.NET to know exactly what a data object
          is. Is this just connecting to a database or something else? For the
          form, ColdFusion developers usually use the <cfquery...> tag.

          <cfquery name="myRecordSetVar" dataSource="myConfiguredDSN"...>
          SQL Syntax
          </cfquery>

          Other then that, you will have to tap somebody who knows there ASP.NET
          details better.

          • 2. Re: CF equivilent to asp.net
            bobmoles
            Dim oSDO As SageDataObject130.SDOEngine
            <cfset SDO = CreateObject("com", "SageDataObject130.SDOEngine")>
            Dim oWS As SageDataObject130.Workspace
            <cfset WS = CreateObject("com", "SageDataObject130.Workspace")>

            That should be what you need for com objects. You would then call the methods by using <cfset returnResult = WS.method(variables)>

            Read up on the CreateObject fucntion in livedocs.

            Bob
            • 3. Re: CF equivilent to asp.net
              advancesolutions Level 1
              i have pulled my hair out but cannot get CF to work with this com object, i just get An exception occurred when instantiating a COM object.
              Invalid com object, the object is registered fine and works ok with asp.net and javascript?