COM object problem

I am attempting to rewrite some ASP code with CF MX 7. The
ASP code originally returned a recordset from Microsoft Indexing
Service. I can create the object and return the number of objects
within the recordset but I don't know how to access the records
within the recordset (i.e. output the records).
I've tried the code below to loop over the collection without
any success as I receive the error: " The cause of this exception
was that: java.lang.NoSuchMethodException: There is no method
called Item."
Any help would be appreciated.
<cfobject action="create" type="com" name="q"
class="ixsso.query">
<cfset q.query(#searchstring#)>
<cfset q.catalog(#catalogtosearch#)>
<cfset q.sortby(#searchrankorder#)>
<cfset q.columns("doctitle, filename, size, write, rank,
directory, path")>
<cfset q.maxrecords(#maxrecords#)>
<cfset rs = q.createrecordset("nonsequential")>
<cfoutput>
This object has #rs.recordcount# items.
<BR>
<HR>
</cfoutput>
<cfloop collection = "#rs#" item = "file2">
<cfoutput>
Path: #file2.path# <BR>
</cfoutput>
</cfloop>

You have to iterate over the recordset with the MoveNext()
method.
Here's an Adobe KB article on the subject
http://www.adobe.com/devnet/coldfusion/articles/asp_cfmx.html

Similar Messages

  • Problem instantiating COM+ object

    Hi,
    I'm trying to instantiate a com+ object using
    <cfobject> and I'm getting:
    An exception occurred when instantiating a Com object
    The cause of this exception was that: AutomationException:
    0x80070002
    The com object is built in c# .net and implements the
    iDispatch interface. We're running mx 7, and using the following
    syntax to instantiate the object:
    <cfobject type = "com" action = "create" class =
    "COMService" name = "myCOMService" context = "local" />
    Can anyone suggest any pointers?
    Thanks,

    Turns out it was a problem with the COM+ component. Googling
    the specific error code 0x80070002 helped to uncover the
    problem.

  • Problem calling COM Object on Windows Server 2008 x64

    Hi,
    We are using 32 bits COM object called in Coldfusion page on 32 bits OS. It works fine since few years.
    Now we need to use it on x64 Windows Server 2008 and 64bits IIS.
    As I 've seen (http://www.coldfusionjedi.com/forums/messages.cfm?threadid=87869C67-B1 9B-288F-F32B6E8BAB3228CA ),a 64 bits process can only call 64 bits DLL.
    So we created a 64 bits Wrapper like this : http://www.dnjonline.com/article.aspx?id=jun07_access3264
    But  calling 64 bits COM Object still raises the same error (" The cause of  this exception was that: java.lang.RuntimeException: Can not use  native  code: Initialisation failed") whereas it works fine with a 64 bits  executable created in .NET for example.
    Is there a known issue about this subject?
    Sorry for english , I'm a french developper.
    Thanks in advance.

    Can somebody please share the solution for this issue?
    I am facing similar issue with Windows 2012 R2 x64 OS and Excel 2007(32-bit) combination.
    I tried couple of things like Excel is able to Open an existing workbook on my system but fails to
    create a new Workbook as done by invoking the "Add" command. It fails with Error 800a03ec.
    I tried creating the two folders i.e. C:\Windows\SysWOW64\config\systemprofile\Desktop & C:\Windows\system32\config\systemprofile\Desktop, but could not get it working.

  • Creating a COM object with CF9 32-bit on Windows Server 2008 R2 64-bit machine

    I'm using a 32-bit version of CF9 and it's installed on a Windows Server 2008 R2 machine (64-bit).  The problem I'm running into is that it won't allow me to create a COM object - it gives me the error, "no ntvinv in java.library.path null" when I try to run,
    <cftry>
    <cfobject type="COM" action="CONNECT" name="Engine" class="JRO.JetEngine">
    <cfcatch type="Any">
        <cfobject type="COM" action="CREATE" name="Engine" class="JRO.JetEngine">
    </cfcatch>
    </cftry>
    Then when I run it a 2nd time, I get "An exception occurred when instantiating a COM object. The cause of this exception was that: java.lang.RuntimeException: Can not use native code: Initialisation failed."
    Can you help me?

    Replying for your patchset installation pre-req error:
    Use below command:
    ./runInstaller -ignoreSysPrereqs
    Review MOS note 763143.1 for more info.

  • Error Msg "Invalid Com Object Exception is output"

    Hi,
    The following error message was output when I tried to perform an
    optimization on the Finance Application.
    "An unhandled exception has occurred in your application....COM object
    that has been separated from its underlying RCW cannot be used".
    However, when my colleague perform the same optimization using her PC, it was ok. Please advise if there are any specific settings that are I need to set at the client or desktop level in order to avoid the error.
    Cheers
    Hon Leong

    Hi,
    My notebook is on Windows XP and Office 2007. As per your suggestion, I have run the client diagnostic program and found the following error:
    [Internet Explorer Option setting]
      Proxy server
        No proxy setting
      Use HTTP 1.1
        Required: True
        Currently: True
        Status: OK
      Enable Integrated Windows Authentication
        Required: False
        Currently: True
        Status: Error
    Would you be able to advise how I can disable the Integrated Windows Authentication so that I can see the problem is due to the above error.
    Cheers
    Hon Leong

  • COM Component problem with BPC Excel

    Hi!
    We are using BPC MS 7.5 service pack 3 version. Microsoft Office 2007
    On one of our client machines we got problem when trying to enter BPC for excel,nothing appears and something is downloading showing Installing COM Component from http://activex.microsoft.com/objects/ocget.dll site. And after a while Excel is shut down.
    It´s the same errro entering from Launch Page or Log on from native Excel.
    We have already tried uninstalling and installing BPC client and uninstalling and installing Microsoft Office on this specific client machine with the problem.
    Regards
    Fredrik

    This was solved by this Microsoft fix:
    http://support.microsoft.com/kb/323207/en-us

  • Word 2007 COM object

    I am having a heck of a time finding a good example of a word
    COM object. I just upgraded from word 2000 to word 2007, in hopes
    that would suddenly work for me (which honestly I didn't
    expect...). In word 2000, this line worked fine, but not in 2007:
    thisDoc.SaveAs("c:\MyDoc.doc");
    Here is what I am trying to accomplish: I need to use values
    submitted by forms and input it into a word document. The word doc
    needs to have different paragraphs in different formats. I thought
    I could build the paragraphs somehow, with formatting with
    something like para1 = docrange.newparagraph(); then insert the
    text and formatting into para1 and then insert para1 into the
    document. It does not seem to be working at all. If someone can
    link me to a good example I can figure it out from there, but I
    don't seem to be able to find it. Here is my code so far:
    <cfquery name="getAttorney" datasource="agreement">
    Select * from Attorney where ID = #Form.attorney#
    </cfquery>
    <cfoutput query="getAttorney">
    <cfset attornyInfo =
    "#Name#
    #email#
    #Phone#">
    </cfoutput>
    <CFTRY>
    <!--- If it exists, connect to it --->
    <CFOBJECT
    ACTION="CONNECT"
    CLASS="Word.Application"
    NAME="objWordApp"
    TYPE="COM">
    <CFCATCH>
    <!--- The object doesn't exist, so create it --->
    <CFOBJECT
    ACTION="CREATE"
    CLASS="Word.Application"
    NAME="objWordApp"
    TYPE="COM">
    </CFCATCH>
    </CFTRY>
    <CFSCRIPT>
    /* This will open Word if running locally */
    objWordApp.Visible = true;
    /* This returns the 'Documents' collection the Word Object
    thisDoc = objWordApp.Documents.add();
    /* Save the document to a location */
    thisDoc.SaveAs("c:\MyDoc.doc");
    docRange = thisDoc.Range(0);
    docRange.Style=-2;
    docRange.InsertAfter("Header1");
    docRange.InsertParagraphAfter();
    docRange.Style=-3;
    docRange.InsertAfter("I am the paragraph you requested");
    docRange.InsertBreak();
    docRange.InsertAfter("check me out... I'm on the second
    page!");
    para1 = thisdoc.paragraphs.count();
    data = docrange.listparagraphs();
    data1 = docrange;
    /* Save the changes */
    thisDoc.Save();
    /* Close the document */
    thisDoc.Close();
    /* Quit Word */
    objWordApp.Quit();
    </CFSCRIPT>
    <cfdump var="#para1#">
    <cfdump var="#data#">
    <cfdump var="#data1#">
    The dumps do dump information on the related objects, giving
    me methods, puts and gets, but I need more explantion than what is
    actually provided. Para1 used to dump "1" even though I had more
    paragraphs than that in the build. Since I upgraded to 2007, I have
    not gotten it not to error out, I will try to save it as a docx,
    but a doc is really more appropiate for my purposes.
    Thank you for your time.

    The last time I had to deal with a requirement like this,
    which was
    about 2000-2001, we eventually scrapped the word COM thing.
    Even then
    it was such a fragile and perilous solution, fraught with
    problems and
    headaches.
    What we ended up doing, that was much easier, was to create a
    .rtf, rich
    text format, file. We could do all the required formating in
    this
    format, and 90% of the uses would have this file open in MS
    Word and not
    even know they did not get a .doc file.
    How we did it was create a .rtf template with dummy text that
    had all
    the desired formating. Then we could read in the .rtf file,
    which is
    just a marked-up text file, not a binary, and string replace
    the dummy
    text with the dynamic text. Save it again and viola a rich
    text
    formated file with the required content.
    These days, I would push for doing this in PDFs and use
    ColdFusion's
    <cfdocument...> and|or <cfpdf...> functionality.
    But if it has to be
    Word, I suppose it has to be Word.

  • Method not found error when creating COM object

    i am trying to initiate a COM object with CF and Imagemagick
    on windows 2003. when i initiate the object i get the error "The
    selected method convert was not found." if i do a dump of the
    method in the COM object but i cant call it. what am i missing?
    the code i am using is attached.
    the VBscipt sample that comes with imagemagick works fine,
    its just that CF cant all it. any ideas?
    thanks
    NF

    Hi,
    Have you had a reponse or find the solution?
    I have a similar problem, no error message but that kill the
    session.
    Thanks
    Didier

  • Controlling Matlab via TestStand COM Objects

    I am attempting to control MATLAB via teststand activex com objects.  I set up my module to use the matlab 7 automation server, and when I try to run the sequence, I get this error:
    "Create New Object" in automation call failed.
    No such interface supported
    One reason this can occur is if the interface of your COM server cannot be marshaled. This can happen if your server is not using the default OLE marshaling implementation and does not implement its own proxy and stub code. If you write your server using Visual C++ you can add the oleautomation attribute to your interface in order to use the default OLE marshaling implementation. Alternatively, COM does not require marshaling if the server's threading model is the same as the client thread's apartment. You can try changing your server's threading model or the client thread's apartment to avoid the need to marshal the interface."
    Anyone know how to fix this?
    -Joey

    It turns out this issue was a bug within Matlab itself.  The correct registry keys were not being added for the Matlab ActiveX server with version 7.2.  The bug report is located here.  Once the correct registry keys were added there was no problem calling the Matlab ActiveX interface.
    Pat P.
    Software Engineer
    National Instruments

  • COM object that has been seperated from its uderlying RCW cannot be used

    What exactly does this error mean?
    I receive this error when I perform "Unload All Modules" from the sequence editor using TestStand 4.2.1.83 development system, which is part of NI Developer Suite 2010 DS1.
    It causes TestStand to crash citing that error, and then a secondary error cites corrupted memory.

    ATE_Dude_22 wrote:
    Here is a capture of my sequence editor, where I have a alert from TestStand telling me the parameter specified doesn't match the sequence parameters (specified in the vi prototype as a string not a number), but this version of TestStand allows it to execute without needing to clear the error.
    Do you think this may have anything to do with the error I am seeing?
    Probably not. Sequence calls support mismatched parameters, what happens is that the callee gets whatever is passed to it, if that's not what it's expecting, then you might get a type mismatch error if type checking is enabled, if not then it's up to the sequence what it tries to do with the parameter for what happens next.
    Most likely the bug is in one of the code modules you are calling, probably a vi or dll is not properly maintaining a reference count somewhere or is corrupting memory and only indirectly causing the error. If most of your code is in labview, one thing to look out for is incorrectly specified calls to dlls from LabVIEW. If a call to a dll is incorrectly specified, either from LabVIEW or TestStand that can very easily lead to memory corruption and random errors later on in the code.
    I'd recommend trying to either debug and see where it's failing, if it's always failing in the same place. Or try to eliminate possibilities and reduce the called code to the minimum code required to reproduce the problem and then look for bugs in that code (paying special attention to the possibility of incorrectly specified dll calls and/or perhaps incorrectly maintained reference counts on COM objects).
    Another idea, to see if the problem is memory corruption caused by a vi, is to run all of your labview vis using the development environment (labview adapter setting), if so, any memory corruption would be in the labview process and not the main teststand process and should not bring down teststand.
    -Doug

  • Business Object problem with terminal server

    Post Author: Yaron
    CA Forum: Authentication
    Hello, I have a problem running Business Object ( version 5.1.8 at the moment, we might change to XI soon ) on windows 2003 terminal server (citrix) and we have problems from every station without full administrative rights. Giving full access to either the folder or the entire HDD did not help.Difference is the Business Object starts by calling his COM object rather then the normal exe for authentication issues and i think it might be a part of the problem.Thanks in advanace and apologies if I posted in the wrong place.

    Hello,
    Thanks.
    Pinging from client is successful.
    And the repository is not accessible from the client side.
    We install the client tool in other computer and we still can't connect.
    We got message : "Cant access repository"
    I'll appreciate your help. Thanks.
    Regards,
    Eco

  • Calling test sequence from CVI DLL that use ATL COM object does not work

    I am trying to call some DLL function writen in CVI from teststand. The CVI DLL is using ATL COM object(Written by me).
    The ATL COM object making instance of several ATL COM object inside it (including two controls that contains dialog). If I use a client writen in VC++ 6 and use the ATL COM (writen by me) works perfectly. But if I try to use it from CVI DLL it does not work any more.
    What is wrong? The client is passing an IUnknow interface to my component. Can anybody explain me what is wrong?

    It is not clear from your question as to what is specifically failing. If possible, one option would be to remove TestStand from the picture and see if the problem still occurs using a CVI EXE that invokes the CVI DLL.
    Scott Richardson - NI
    Scott Richardson
    National Instruments

  • COM object model not functioning after encrypting the word document using office extention

         After encrypting A word document using office extention, it seems like the COM object model becomes unusable. I cannot not manipulate the encrypt document through COM interface, nor can I write macro VBScript to do some operation on the docuent.
         For example, I create a word Macro with some simple code.
    Sub hi()
        Dim i As Integer
        i = ThisDocument.Fields.Count
        MsgBox i   
    End Sub
         If the document is not encrypt, then we will see a msgbox which tells us the number of bookmarks in the current document.
         Now, encrypt the word document using the office extention, running the macro code will fail with error code " 80004005" and error message:Method 'Fields' of bject 'ThisDocument' failed.
    It is very important for us to manipulate word documents through COM interface in our system, I want to know why the COM interface does not work anymore after the document is encrypted.

    I take macro script as an example to demonstrate that word COM object model cannot be used after encripted. Actually you can reproduce the same problem when you manipulate word document through COM interface using any programming language.
    For example, you can create a text document  with the following VBscript:
    set a = createobject("Word.Application")
    set doc = a.Documents.Open("E:\temp\test.docx")
    msgbox doc.Fields.count
    doc.close
    a.quit
    Save the document with ".vbs" file extention and then run it by double clicking it. it will fail if the document is encrypted using the office extention. 

  • Executing plug-in through COM object

    Hello,
    I have tried  to create plugin with ATL COM object for  possibility execute the function into plug-in from my  application. And have got Runtime Exception which  refer to red line in code below ("Expression: gCoreVersion>=CoreHFT_VERSION_2")
    The next list is my C# code for invoke function RunReplacen for COM coclass ConnectorToAcrobat
         Type type = Type.GetTypeFromCLSID(guid);
         ConnectorToAcrobat connector = (ConnectorToAcrobat) Activator.CreateInstance(type);
         connector.RunReplace(@"Part1.u3d");
    The next C++ code  is part of COM object
    #ifndef MAC_PLATFORM
    #include "PIHeaders.h"
    #endif
    STDMETHODIMP CConnectorToAcrobat::RunReplace(BSTR filePathToU3D)
          char myPath[MAX_PATH];
          wcstombs(myPath, filePathToU3D, MAX_PATH);
          ASAtom pathType = ASAtomFromString("Cstring");
         // Function of plug-in
          CreatePDFWith3DAnnotation(&name);
          return S_OK;
    What is wrong? How can I workarround this problem?

    No, plugin and COM object it is a one  solid file.
    Anyway, I've faced with new problems.  The  AVDocOpenFromFile(ASPathName , ASFileSys , ASText )  function  works perfectly,  but if file doesn't containe forms. And when I want to open file with forms I getting crash.
    Next, works with multithreading.
    ACCB1 ASBool ACCB2 PluginInit(void)
    DWORD ThreadID;
    HANDLE hThread = CreateThread(0,0, ThreadProc, NULL, 0, &ThreadID);
    return MyPluginSetMenu();
    DWORD WINAPI ThreadProc(LPVOID lpParam )
    BSTR filePathToU3D = SysAllocString(L"Part1.u3d");
    char myPath[MAX_PATH];
    wcstombs(myPath, filePathToU3D, MAX_PATH);
    ASAtom pathType = ASAtomFromString("Cstring");
    //Unhandled exception at 0x56230fa0 in Acrobat.exe: 0xC0000005: Access violation reading location 0x00000044.
    ASFileSys fileSys = ASGetDefaultFileSysForPath(pathType, myPath);
    ASPathName name = ASFileSysCreatePathName(fileSys, pathType, myPath, NULL);
      CreatePDFWith3DAnnotation(&name);
        return 0;
    (this code works fine in one thread)

  • Microsoft return Windows Runtime Object vs COM Object

    Hi,
    We create a custom project like C#, c++ project in visual studio.
    We want to support different source control provider. Currently we have supported TFS.
    Now when we want to support AnkhSVN, we found the issue below:
    When adding a new model file, the plus icon cannot display before the model file.
    Since AnkhSVN is open source, after debugging, we found that:
    When it gets glyph status, SVN cannot get the correct value. The status is None instead of ShouldBeAdded (expected)
    The root cause is that
    OnAfterOpenProject(IVsHierarchy pHierarchy,
    int fAdded)
    pHierarchy is a Windows runtime object and is added to
    _projectMap(Here it's the ProjectNode)
    While in TrackProjectChanges called by
    OnAfterAddFilesEx
    internal
    bool TrackProjectChanges(IVsSccProject2
    project, out
    bool trackCopies)
                // We can be called with a null
    project
    SccProjectData data;
    if (project !=
    null && _projectMap.TryGetValue(project,
    out data))
    The project is COM object. That's why _projectMap cannot get the value since it includes the Windows Runtime Object as the key.
    However, in C# project, Visual Studio return both the COM Object.
    Question:
    Is there any way that can make the pHierarchy as a COM Object OnAfterOpenProject(IVsHierarchy pHierarchy, int fAdded)?
    Regards,
    Lyle

    Hi Lyle,
    Since it's not a product from Microsoft, I would recommend that you as the ankhsvn for dedicated support here:
    https://ankhsvn.open.collab.net/
    or post your question here:
    https://visualstudiogallery.msdn.microsoft.com/E721D830-7664-4E02-8D03-933C3F1477F2
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.
    Thanks Caillen for your response.
    The Problem here is that both of the two functions are the API Visual Studio gives. It's Visual Studio gives the different object type for the same ProjectNode. 
    So I'm wondering why Visual Studio gives us different object type on the Runtime.
    Regards,
    Lyle

Maybe you are looking for

  • How to download How Do I? videos for my HP Officejet 6500 E709n printer?

    Dear Sir or Madam: Is there any way to download "How Do I?" video clips from the HP Solution Center for my HP Officejet 6500 E709n printer and save them directly to the desktop area of my Windows XP Home desktop computer? Please reply back soon. Than

  • Meta tag question(s)

    I am curious about a meta tag I came across: <meta name="description" content=" "> <meta name="keywords" content=" "> <meta name="revisit-after" content="31 days"> <meta name="robots" content="all"> <meta name="url" content=" http://www.cariholdorf4h

  • Query for local admins

    What is the query for finding out who all has local admin access on there workstations?

  • TS1702 mime-attachment.ics problem

    When I'm sent a calendar entry (appointment) from a colleagues pc using Outlook it arrives as a mime-attachment.ics. Until recently I could click the icon and it would register as an appointment on the iPhone calendar. For reasons that mystify me it

  • LR catalogue and updating to Snow leopard

    Hei, I am about to update my my OS X (Leopard) to Snowleopard and was thinking of doing a complete update, since my mac has become quite slow, so I'd like to use this opportunity. My question is concerning my LR (v. 2.4) catalogue. I don't store my p