Asynchronous call with OO4O

Hello,
I have a problem. The asynchronous call worked faultlessly under Oracle DB 10.2 and Oracle client 9.2. After the rearrangement to Oracle client 10.2 the VB6 function cannot be ended correctly. If I install the call OraStmt.Cancel explicitly, the function gets stuck directly at cancels. The Stored Procedure is very extensive. It consists from cursors and Object type.
Can one help me at this problem?
Many thanks in advance!
Benedikt Taube
Important data:
Development environment:     VB6
OO4O:                     10.2.0.2.20
Oracle Client:               10.2.0.1.0
Oracle Net:               10.2.0.1.0
Oracle-DB:                10.2
Function (...)
Set colCrefos = Nothing
Set colKapitel = Nothing
Set colEntscheider = Nothing
lngRetCode = 0
objConnection.DB.Parameters.Add "RET", ORACLE_KO, ORAPARM_OUTPUT, ORATYPE_NUMBER
objConnection.DB.Parameters.Add "CREFOS", Null, ORAPARM_OUTPUT, ORATYPE_VARRAY, (SCHEMAOWNER & ".CCRF_ORGANISATIONS")
objConnection.DB.Parameters.Add "KAPITEL", Null, ORAPARM_OUTPUT, ORATYPE_VARRAY, (SCHEMAOWNER & ".CCRF_KAPITELS")
objConnection.DB.Parameters.Add "ENTSCHEIDER", Null, ORAPARM_OUTPUT, ORATYPE_VARRAY, (SCHEMAOWNER & ".CCRF_ENTSCHEIDERS")
objConnection.DB.Parameters("NAME").Value = objTools.String2Varchar(strName)
objConnection.DB.Parameters("HAUSNUMMER").Value = objTools.String2Varchar(strHausnummer)
Set OraStmt = objConnection.DB.CreateSql("Begin :RET := " & SCHEMAOWNER & ".CRF_SUCHE.ANSCHRIFT( :RETCODE, :NAME, :RECHTSFORM, :PLZ, :ORT, :STRASSE, :HAUSNUMMER, :CREFOS, :KAPITEL, :ENTSCHEIDER); end;", ORASQL_NONBLK)
On Error GoTo err_asynchron
Dim stat As Long
stat = OraStmt.NonBlockingState
While (stat = ORASQL_STILL_EXECUTING And Me.Cancel = False) 'ORASQL_SUCCESS
DoEvents
stat = OraStmt.NonBlockingState
Wend
err_asynchron:
err.Clear
On Error GoTo Anschrift_Err
'OraStmt.Close
'Set OraStmt = Nothing
If Me.Cancel = True Then
Anschrift = True
Else
lngRetCode = objConnection.DB.Parameters("RETCODE").Value
If lngRetCode = ORACLE_KO Then
Call err.Raise(objConnection.DB.LastServerErr, sFnc, objConnection.DB.LastServerErrText)
End If
Anschrift = IIf(objConnection.DB.Parameters("RET").Value = ORACLE_OK, True, False)
If Anschrift = True Then
Set colCrefos = objConnection.DB.Parameters("CREFOS").Value
Set colKapitel = objConnection.DB.Parameters("KAPITEL").Value
Set colEntscheider = objConnection.DB.Parameters("ENTSCHEIDER").Value
End If
End If
Anschrift_Ex:
For i = 1 To objConnection.DB.Parameters.Count
objConnection.DB.Parameters.Remove 0
Next i
Exit Function
Anschrift_Err:
Resume Anschrift_Ex
End Function

Hi Babu,
That is the problem with AltovaXMLSPY, it always expect a resonse..and if don't get one it will shown empty headers..
check moni and see if you have only one entry then your scenario is working and it is working in async mode
Regards
Suraj

Similar Messages

  • Asynchronous call with soap adapter?

    Hi All
    I Scenario status update in CRm using Webservice using SOAP adapetr. when i am testing in ALTOVA SPy when i send response it successfully updates status , it also send back message
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Header/>
       <SOAP:Body/>
    </SOAP:Envelope>
    But my interface is Asynchronus, My communication channel Quality of service is set to : Exactly once .
    when i am creating webservice i using following url
    http://xx.xx.xxx.xx:port/XISOAPAdapter/MessageServlet?channel=:service:sendercommunication channle &ProcessingMode=Asynchronous&QualityOfService= Exactly Once
    How can i avoid response back.
    Thanks
    Babu
    Edited by: babloo babu on Dec 16, 2009 2:03 PM

    Hi Babu,
    That is the problem with AltovaXMLSPY, it always expect a resonse..and if don't get one it will shown empty headers..
    check moni and see if you have only one entry then your scenario is working and it is working in async mode
    Regards
    Suraj

  • Asynchronous calls in BEA CORBA

    Hi all,
    from what we know it is possible to asychronous calls with CORBA via those methods
    - AMI
    - Notification Service
    - one way request
    I dont see in the current version of BEA Tuxedo (8.1) that AMI is supported .
    Notification Service is available , but it seems that the channel is one blocking
    process. Therefore I have doubts re performance.
    Are one way requests blocking or unblocking ? Accorsing to the documentation BEA
    is recommending those because of the lack of quality of service and scalability
    issues.
    What is the best way to do asynchronous calls with BEA Tuxedo CORBA ?
    Any hints ?
    Thanks,
    Iris

    What you are proposing makes good sense. The problem with
    asynchronous communication is the problem with errors. The
    typical send and forget many asynchronous systems use leads to
    serious reliability problems. About the only way to guarantee
    reliability is to use a transacted queuing mechanism such as
    /Q. Using CORBA for external communication and ATMI inside
    seems like a reasonable approach. You may run into difficulties
    though if you need a single server to be both an ATMI server
    and a CORBA server. I'm not certain that is supported. In your
    case though it sounds like you'll have a CORBA server that is
    an ATMI client and that should work.
    Regards,
    Todd
    "Iris Peters" <[email protected]> wrote:
    >
    Hi Todd,
    the system we are investigating is already using ATMI and /Q. The client
    has got
    a system which is based on the pipeline principle which is asynchronous.
    Our client
    would like to know if this system if appropriate for using asynchronous
    CORBA
    messages inside and not ATMI anymore . There are also ideas to use CORBA
    to interface
    with external systems.
    Our suggestion is to just use CORBA to interface from and to external
    and leave
    the ATMI stuff as it is amd maybe just provide a CORBA wrapper for the
    ATMI calls
    to external.
    Regards,
    Iris
    "Todd Little" <[email protected]> wrote:
    Tuxedo does not provide AMI. Besides the alternatives you listed,
    one can also use the Dynamic Invocation Interface to acheive
    deferred synchronous behavior. Can you describe what it is you
    are trying to accomplish and how you see asynchronous messaging
    helping you?
    An alternative might be to use ATMI and use Tuxedo's /Q mechanism.
    Regards,
    Todd
    "Iris Peters" <[email protected]> wrote:
    Hi all,
    from what we know it is possible to asychronous calls with CORBA via
    those methods
    - AMI
    - Notification Service
    - one way request
    I dont see in the current version of BEA Tuxedo (8.1) that AMI is supported
    Notification Service is available , but it seems that the channel is
    one blocking
    process. Therefore I have doubts re performance.
    Are one way requests blocking or unblocking ? Accorsing to the documentation
    BEA
    is recommending those because of the lack of quality of service andscalability
    issues.
    What is the best way to do asynchronous calls with BEA Tuxedo CORBA?
    Any hints ?
    Thanks,
    Iris

  • Asynchronous SUBMIT or CALL WITH creation of NEW SESSION

    I'm doing monotonous comparisons between systems, but I do need to see the SAP standard comparison for each. So I have an ALV list that I'd like to double click a line entry that will spawn 3 NEW SESSIONS and I'll automatically populate the parameters.
    So, has anyone been able to SUBMIT or CALL WITH THE KEY BEING THAT IT MUST CREATE 3 NEW ASYNCHRONOUS SESSIONS. I'd be grateful if you'd share your experience in this regard. Thank you, Adrian

    Hi,
    You can try in this way.
    Create a new FM and place your code there. Call this FM using addition STARTING NEW TASK. It should work fine.
    Check out F1 help on CALL FUNCTION for more details and additions.
    Thanks,
    Vinod.

  • Unexpected loop behaviour with asynchronous call

    I am having trouble with loop behaviour when using an asynchronous call.
    I am building an application to record simultaneously temperature (NI USB-TC01 thermocouple), displacement (DC voltage, read from an Agilent 34401a) and resistivity (using a Keithley 2400 sourcemeter).
    I am using a voltage sweep function on the Keithley 2400 to alternate current direction in a sample and measure the voltage drop - this is a common technique for eliminating thermal emf from resistance measurements. But what you need to know is that I set the number of current cycles I want and then wait for the instrument to measure and return the meausurements - up to 50 samples, which takes nearly 30 seconds. With the other two measurements, I have to programmatically call a measurement vi for each sample I want.
    I have set up my application to asynchronously program the resistivity measurement and then wait for the response, and I want to in parallel measure temperature and position until the resistivity is done. I then want to record the mean and standard deviation for each signal. I used an event structure to interrupt the temperature and position measurements when done.
    The problem I am running into is that after the first resistivity measurement is completed and I go to do the second one, the loop that measures temperature and displacement only runs twice, so I only get two samples, regardless of how many resistivity samples I want to collect. For example, if I want 50 resistivity samples at a time, the first iteration will measure rougly 40 samples of temperature and displacement, but any subsequent iterations will only measure twice.
    I know this is probably overwhelming to understand the operation, but can anyone help? I have attached my code ('Delatometer') as well as a test vi I built that uses the same structure but has no interactions with instruments ('asynchronousCall').
    The
    Attachments:
    Delatometer.zip ‏221 KB
    asynchronousCall.zip ‏29 KB

    I forgot to mention...the test vi that I uploaded executes as expected, so I am thinking that maybe its an issue with the instrument calls? I also found that if I run the Delatometer program in 'highligh execution mode' it runs properly, and it is my understanding that in 'highlight execution mode' there is no multi-threading.

  • How to call a package with OO4O?

    I have designed a package which execute a procedure.
    How can I call it with OO4O?
    Please give me a sample code.

    Hi,
    I persume that you are facing this problem when u try to code in VB. If that is the case here comes the code.........
    OraDatabase.Parameters.Add "A_NBR_NEWSID", A_NBR_NEWSID, ORAPARM_INPUT, 2
    OraDatabase.Parameters.Add "A_NBR_TOPICID", A_NBR_TOPICID, ORAPARM_INPUT, 2
    OraDatabase.Parameters.Add "A_NBR_USERID", A_NBR_USERID, ORAPARM_INPUT, 2
    OraDatabase.Parameters.Add "result", 0, ORAPARM_OUTPUT
    OraDatabase.Parameters("result").serverType = 2
    OraDatabase.ExecuteSQL ("declare result Number; Begin :result := PKG_CONTENT_MANAGEMENT.FUN_GET_NEWS_PERM_BY_USERID(:A_NBR_NEWSID, :A_NBR_TOPICID, :A_NBR_USERID); end;")
    OraDatabase.Parameters.Remove "A_NBR_NEWSID"
    OraDatabase.Parameters.Remove "A_NBR_TOPICID"
    OraDatabase.Parameters.Remove "A_NBR_USERID"
    FUN_GET_NEWS_PERM_BY_USERID = OraDatabase.Parameters("result").Value
    OraDatabase.Parameters.Remove "result"
    Hope this clear your doubt..
    Raj

  • Error handling / logging with asynchronous calls

    Hi,
    I want to log every error my app might throw. I thought it would be sufficient to surround either the launch method or the start method with a try...catch. But it doesn't work as excepted.
    If an error occurs in an asynchronous call, e.g. in a button click, the exception is never caught.
    Do you have an idea, how to solve this?
    Example:
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class TestApp4 extends Application {
        public static void main(String[] args) {
            launch(args);
        public void start(final Stage stage) throws Exception {
            try {
                final VBox root = new VBox();
                Button button = new Button("Click");
                button.setOnAction(new EventHandler<ActionEvent>() {
                    @Override
                    public void handle(ActionEvent actionEvent) {
                        int i = 0;
                        int a = 5 / i;
                root.getChildren().add(button);
                Scene scene = new Scene(root);
                stage.setScene(scene);
                stage.show();
            } catch (Exception e) {
                // do logging here
                e.printStackTrace();
    }

    I'm not 100% sure how it works, but what I am pretty sure is that these Exceptions in EventHandlers are caught by JavaFX itself inside the JavaFX thread. They have to, because if they let the exception bubble up to the top, the FX thread would end (and with it, all response in the UI). It is probably caught at the level where Events are triggered somewhere (my guess is inside the QuantumToolKit).
    Anyway, these exceptions are printed to System.err -- if you can redirect that stream to a log file or whatever you can have them all in one place. The error stream can be set in your application simply by calling System.setErr().
    Note also that exceptions occuring in a Task are stored in the exception property -- sometimes these can be hard to find as they are put there silently -- you'll need to check your Tasks for exceptions and print them.

  • Is there a way to process multiple asynchronous calls individually (instead of all at once)?

    Hello,
    I have a function that saves a record using a RPC call (asyncToken with a new responder).  When I save an individual record (pressing "s" key), it works fine.  However, when I attempt to save multiple records simultaneously (bound to "v" key) (I have a for loop running through the selectedItems in the datagrid), it performs strangely.
    For anyone who hasn't experienced this, the successive calls seem to get stacked (literally - i.e. using a stack) and processed at the end of all operations in that block of code (I had trace functions before and after the call that were executed before I saw the result confirming this).
    What I would like to do is to simulate multiple AsyncToken usages with a single click, but still have them all occur individually since right now, the function saves the last item in the stack 8 times instead of saving each of the 8 items separately.
    OR
    Is there another means of RPC using something like "interruptToken" as opposed to asyncToken?  (In most other areas I've seen, asynchronous calls are performed as interrupts and dealt with immediately, thats why this procedure confused me for a bit)
    Thanks in advance,

    The second paragraph you posted is definitely worthwhile - still figuring out some of the inner workings of Flex calls (not just RPC stuff) that I use as I am pretty new to flex.
    I don't have the code with me at the moment, but I think I have to use separate calls to the save function.  My situation is this (and I plan on updating with code on Monday if necessary):
    I have a datagrid that is populated using a single RPC (which is loaded into an arrayCollection first then the datagrid).  Changes are made to the datagrid through a copy/paste function that I made, but these changes are only reflected on the datagrid (i.e. not in the dataprovider).  When the user hits "save", the selected line (selectedItem actually - i.e. not an index but the object itself) is passed to another class which contains a modified version of my "modify data" function (brings up a dialog after choosing a given line allowing editting/validation of certain fields regarding the selectedItem).  This changed version of "modify data" is then called and immediately closed effectively saving this record (without allowing the user to alter fields - so they don't have to hit save twice).
    With the copy/paste function, I make all of these changes en masse and then have a loop that goes something like
    for each (_object:Object in myDatagrid.selectedItems)
         callSaveFunction(this, _object);
    which ideally loops through the data and saves each item that has been changed.  If there is a way to save all of the data in the datagrid simultaneously, I would appreciate a bit of help there (perhaps dealing with the bindings - right now I have the object I save as the destination and the source is myDatagrid.selectedIndex.[field name]).
    Good to know about the other stuff, though - my understanding was a little bit lacking before

  • How can we tell if a VI is already running before calling Start Asynchronous Call?

    The new Start Asynchronous Call node is awesome for spawning multiple instances of reentrant VIs.  However, I've stumbled a bit in using it for non-reentrant VIs.  The old practice of using the "Run VI" method would allow us to check the Execution.State of the VI before invoking the method to run it.  That way if the State was Running or Run Top Level, we could skip the invoke node and just use a property node to open its front panel.  WIth the Start Asynchronous Call node, it looks like we have to use a strictly typed static VI reference, and when we open the VI reference, the VI gets reserved and its Execution.State = Running.  So, how can I tell if it is not just reserved by the thread but actually executing before making a redundant Start call?
    By the way, the redundant Start has interesting behavior.  It will actually cause the targeted VI to be executed again after it stops.  Even if you hit the Abort button on the target VI, it will immediately execute again and again equal to the number of times the Start Asynchronous Call node was run.  There's nothing wrong with that, and I suppose the simple answer is to just go back to using the old "Run VI" method.  It's just that the ability to wire up those inputs directly to the connector pane is so nice.  Perhaps I am missing something obvious.  Oh, I am referring to the Call and Forget mode (0x80).
    Thanks,
    Dan
    Solved!
    Go to Solution.

    Just throwing it out there, I know I'm a year.5 late on this but if it's a psuedo-modal dialog or some other window that you only want a single instance visible at one time, you can check the FP.State property on the strictly typed vi reference. If it's loaded and visible to the user it will be "Standard", if it was closed or not opened prior then the state will be "Closed".
    I think the standard behavior of serializing execution on another thread would be great for doing a pre-set number of iterations with a sub vi in a non-blocking sort of way but for sub vi's meant for UI interaction checking FP.State works.
    Philip
    CLD

  • Asynchronous call in OSB

    Hi, I was trying to call a business service in an asynchronous way. I used publish action but I can´t get the response of the service. It seems it just work with one-way services like a file adapter. Any help please.

    When you say you are making an asynchronous call, then you would not care about the response.
    If you are looking for a response from the service then you should use a service callout instead.
    Let me know if my understanding is incorrect.
    Thanks,
    Patrick

  • SOAP Receiver Adapter (Asynchronous Call)

    Hi All,
    Scenario is  Proxy to Webservice asynchronous call.
    Scenario configuration is done as follows.
    1) Imported the WSDL and using as a asynchronous inbound interface.
    2) SOAP receiver channel is configured with the target URL & soapAction as given in the WSDL as (soap address & soap Action).
    3) Configured the proxy server details as required.
    SOAP channel is successfully sending the message to the application as DLVD.
    But the issue is target application  not receiving the data. What could be the reason ? I am wondering , i have tried with the external tool like Altova XML Spy & SOAP UI  sending data to the webservice & it's  working fine.
    Please suggest me if anything which can help to resolve this issue.
    Thanks
    Ashwin

    In this case you can do the following:
    1. start your tcpmon or TCPGateway, add there a listener e.g. on port 9090
    2. configure the target URL in TCPGateway for this listener
    3. configure the target URL in your XI SOAP Receiver Adapter to http://<ip of TCPGateway>:9090
    4. now execute the scenario again in XI
    (make sure XI can reach your TCP Gateway, e.g. check Proxy)
    I have used this method successfully for error tracking. In some cases it is necessary to add 2 listeners in TCPGateway and route e.g. 9090 to 9191 and from there to the end (I did not analyse why).
    Then you will be able to see what XI is really sending and you will see the full response from the partner side. You can then compare the XI request data with those which are sent via soapUI. This should give a clue about the problem.
    CSY

  • SQL-Statement with OO4O

    Hello together,
    I post this Question here in
    Re: SQL-Statement with OO4O
    and i should paste my question again in an another database forum.
    now here again:
    I have here following Problem:
    Everthime I make a connection to my database with this code
    Set oSess = Server.CreateObject("OracleInProcServer.XOraSession")
    Set oDB = oSess.DbOpenDatabase(tnsname, user/PWD, 4)
    I get always this Statement in the DB-queue
    SELECT parameter, VALUE
    FROM SYS.nls_database_parameters
    WHERE parameter IN ('NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET')
    Can me anyone tell me why I get this statement and how I can disable it?
    Best Regards
    Andy

    Hi,
    What can you do/change?I must ask next week my boss when he is back,
    what kind of changes I can do.
    Can you add a PL/SQL call to DBMS_APPLICATION_INFO into application?my boss must give me the permission to do a call to DBMS_APPLICATION_INFO.
    A way to identify the source of the badly behaving code is required; whether that be within the DB or external of it.I think so too.
    So please wait, until I have talk with my boss, than I will give you the answer you want. Sorry.
    Any other ideas, what I can do without call/changes on the database to find the problem?
    Best Regards
    Andy

  • Asynchronous call to web servie using pl/sql

    1) How do I make an aynschronous call uisng pl/sql. I am currently using utl_http.
    But it is expecting me to get repsonse using utl_http.get_response.
    Is there anyway I can make asynchronous call to web service? Please give me examples if any.

    Web services are NOT asynchronous as the HTTP application protocol is not asynchronous. A web service cannot (as an sync callback event) initiate a call to the web browser (client app) - as the web browser does not have a tcp listening endpoint. The web service must respond using the EXISTING tcp session established via a connect() call from the browser.
    PL/SQL code executes in a dedicated or shared server process. Execution is serialised. So asynchronous calls are not supported and non-existent. Again, async processing requires some from of notification (callback event, message handler or signal interrupt handler) to inform the main process  (while it is executing code), that the async call has completed.
    And this does not exist in PL/SQL processing for very good reasons. (Oracle would have been one of the most unstable products on the market if it did support async PL/SQL processing, as 99% of developers would not understand how to use it correctly, and would have severely violated the fundamental concurrency and MVCC principles)
    What can be done via PL/SQL (and SQL) is parallel processing - not to be confused with async processing. The API in PL/SQL to use for that is DBMS_PARALLEL_EXECUTE. You can also self roll this using DBMS_JOB or DBMS_SCHEDULER.
    No default IPC exists for inter process communication between parallel processes. If IPC is needed, it needs to be manually coded using a standard SQL table (where row locking provides for mutexes and semaphores), or something like DBMS_PIPE.

  • Asynchronous Call By Reference Examples

    The asynchronous Call By Reference feature was added to LabVIEW 2011 which introduced the Start Asynchronous Call node and the Wait On Asynchronous Call node. However, an oversight lead to the examples for this feature only being installed with the win32 version of LabVIEW 2011.
    I attached the examples for those running a non-win32 LabVIEW 2011. These examples should reside in <examples>\viserver\AsynchronousCallByReference.
    Attachments:
    AsyncCallByRefExamples.zip ‏99 KB

    Hi jcase, 
    Thank you for bringing this issue to our attention. I have created a Corrective Action Request to notify R&D of the issue. Sincerely, 
    Julianne K
    Systems Engineer, Embedded Systems
    Certified LabVIEW Architect, Certified LabVIEW Embedded Systems Developer
    National Instruments

  • Asynchronous Call - collect OR forget?

    Hi all,
    I want to optimize one of my LabView procedures. Let's say that I've got 2 VIs that return the same values, but use differend data sources. I'd like to launch both of them and simply collect the result from the faster one.
    I figured I could do this by running both VIs asynchronously and polling a global variable, but I was hoping that there is a better solution.
    If I "Wait on asynchronous call" for both VI, I'll wait for the slowest one to finish. Is there a way to check if VI has finished its job without running into "wait on asynchronous call"?
    Thanks in advance!
    Tomasz
    Solved!
    Go to Solution.

    In this case, I would probably go with the notifier.  You could possibly also go with a User Event.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for