Get Sequence context from ActiveX reference

Hello,
I am passing to MFC DLL ActiveX reference to freshly created new execution. In examples it is shown how to pass "ThisContext" to DLL (struct IDispatch *seqContextDisp) but i need something like :
- create new execution, save ActiveX reference in local variable
- pass reference to DLL
- in DLL get from reference sequence context and perform some operations (get/set vaiables, etc.)
Thanks.

I'm not sure I fully understand the question but I'll take a stab at it anyways. First if you want to have seq context of the new execution; review my sample seq file I sent along. In this seq file you can pass seq context of the new execution to a dll in either seq/execution.
If this is a simple "C" type question the prototype/code would look something like the .cpp file I attached.
My stuff may have a couple different parameters!
If I misunderstoo the question you might want to send me what you got so far... It might be eaiser for me to see what you are tyring to do and I can finish an example for you.
[email protected]
Attachments:
Sequence_File2.seq ‏16 KB
handleexports.cpp ‏9 KB

Similar Messages

  • Getting Sequence object from pre-step substep of Sequence Call based step type

    How to obtain reference to Sequence object from within pre-step substep of Sequence Call based custom step type?
    Given: new custom step type which based on NI Sequence Call step type. There is Pre-Step substep exist for this step type.
    How to get reference to Sequence object representing Sequence which will run?
    Although there is possible to examine SequenceAdapter and SequenceCallModule properties, it seems redundant since module (Sequence) is already loaded by TestStand ("NI TestStand Reference Manual. Table 3-4. Order of Actions that a Step Performs"   Action #6, while my code is running as Action #13).
    Thanks.
    Misha

    Could you explain what you want to do ?
    Why do you want to get the sequence object within a pre-step substep ?
    I give you some informations but I don't know if it's the better way to do what you want (because I don't know what you want to do with the sequence object).
    If the substep uses the ActiveX adapter :
    You can get the sequence object but you should save the object reference in a StationGlobals variable.
    And you should release the object reference within your sequence when you don't need it any more.
    If the substep uses another module adapter: 
    Get the step module, then the sequence name (module property).
    Then get the sequence object by the sequence name from the sequence file.
    Here are the paths to use for both methods :
    Sequence Name property path : Step.Module.SeqName
    Sequence Object path : RunState.SequenceFile.GetSequenceByName (seqname)

  • Getting the context from a DataControl

    I have a JavaBean that I have converted into a DataControl. Since the methods on that JavaBean are getters, and don't take parameters, I am wondering if there is any way to get at either the request, the session, or the context from within my DataControl.
    Is there some class that will allow me to obtain the current request, session, or context, since my UIX page that uses this DataControl cannot pass these in as a parameter?
    Brad

    Exception? "found: X required: Y" sounds more like a compiler error to me.
    You need to post the lines of code that cause the error so we can see what's going on.

  • Getting user context from webecenter

    I need to get the user context ( who logged in ) from webcenter and use that in the portlet/taskflow. Any one can help me with this?

    getting the following error in the portlet. ( while devoping in jdev)..
    java.lang.RuntimeException: Cannot find FacesContext
         at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:2122)
         at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1933)
         at jsp_servlet.__test_jspx._jspx___tag0(__test_jspx.java:90)
         at jsp_servlet.__test_jspx._jspService(__test_jspx.java:65)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

  • Get sequence start from Transmit API

    I'm using the Transmit API to get the timecode of the sequence as it plays. I'm using the inTime and working out the number of seconds from the ticks.
    This gets the number of seconds from the start, which is fine if the sequence begins at 00:00:00:00, but if it begins at 01:00:00:00 or some other value then all of the timecode values are wrong. I could not figure out a way of getting the sequence start position - am I correct in assuming that such a function doesn't exist?

    For automation purposes you may want to also implement reading any XMP sidecar file that exists. That has the timecode of the capture in it.
    - a good example is to export H.264 in AME/PPro. the resulting xmp/xmpses file has the xmp fields of interest. Open it with WordPad (coz that understands Unicode) and you'll see a XMP:RDP packet like this:
    <rdf:Description rdf:about="" xmlns:stCap="http://ns.adobe.com/xap/1.0/sType/CaptureTimecode#">
        <stCap:CaptureTimecode>
            <rdf:Seq>
                <rdf:li rdf:parseType="Resource">
                    <rdf:value rdf:resource="Capture"/>
                        <stCap:index>0</stCap:index>                    <stCap:capturetime>00:07:01:13</stCap:capturetime> 
                        <stCap:time>00:07:01:13</stCap:time>
                    </rdf:li>
                </rdf:Seq>
        </stCap:CaptureTimecode>
        <stCap:NCapture>1</stCap:NCapture>
    </rdf:Description>
    You can read/write/modify XMP embedded in source files or in sidecar xmp files for sources that can't embed XMP using the Adobe XMP Toolkit.
    http://www.adobe.com/devnet/xmp.html
    regards
    Rallymax.

  • Want to get sequence value from bean

    I want to get sequecne value in abean
    when i try to make this
            String EmpId = (String)JSFUtils.resolveExpression("#{bindings.EmpViewId.inputValue}");Error appear
    Caused by: java.lang.ClassCastException: oracle.jbo.domain.DBSequence cannot be cast to java.lang.String
    and when i tried
            DBSequence EmpId = (DBSequence)JSFUtils.resolveExpression("#{bindings.EmpViewId.inputValue}");another errpr appeared
    how can i catch this DBSequence value

    you did not mention your JDev version.
    For 10g it might be helpful:
    http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/web_complex006.htm
    Example 19-49 Value Change Listener Method for Handling a File Upload Event
    String fileUploadLoc =
    FacesContext.getCurrentInstance().getExternalContext().
    getInitParameter("SRDemo.FILE_UPLOADS_DIR");
    if (fileUploadLoc == null) {
    // Backup value if context init parameter not set.
    fileUploadLoc = "/tmp/srdemo_fileuploads";
    //get svrId and append to file upload location
    DBSequence svrId =
    (DBSequence)ADFUtils.getBoundAttributeValue("SvrId");
    fileUploadLoc += "/sr_" + svrId + "_uploadedfiles";
    I don't know if it works for 11g too.
    NA
    http://nickaiva.blogspot.com/

  • Getting Initial Context from standalone client

    I have not been able to set up the InitialContext for a stand-alone client, sending and receiving a topic.
    I have already looked at and tried all the previous relevant threads, but no success.
    Any help is greatly appreciated.
    Many thanks in advance.

    I have not been able to set up the InitialContext for a stand-alone client, sending and receiving a topic.
    I have already looked at and tried all the previous relevant threads, but no success.
    Any help is greatly appreciated.
    Many thanks in advance.

  • Passing an ActiveX reference from TestStand to Labview

    How can I pass and ActiveX reference (for a dll) created and used in a TestStand sequence (under Locals) to a VI running within that sequence so that I can then call the same instance of the dll from Labview?
    (I know this isn't the best approach to programming but I'm more interested in proving the point than anything else)
    Cheers
    Dan

    Here's what I think you are tyring to do. Within your sequence, instantiate an object from an ActiveX DLL, storing a reference to it within a TS variable. Then, within a VI called by this sequence, call a method of the intantiated object.
    To do this, when specifying your module on your LV step you must check the Sequence Context ActiveX Pointer check box. In the called VI you must have the a Sequence Context control on your front panel and have it wired to your connector pane along with a TestData cluster control and a LV Error Out cluster control.
    Within the VI you use an invoke node to invoke the AsPropertyObject method on the SequenceContext (Make sure you use the ActiveX close function on this new reference when you are done with it.). Use another invoke node to call GetValInterface method on the sequence context property object reference (you could probably also use the GetValIDispatch method. See the help). For this invoke node you will want to use a lookupstring that reference the variable, relative to yo sequence context, in which you stored the refernce to the instantiated object in your sequence file. This will return a variant reference. You must convert this reference to a LV reference using the "To G Data" function in the ActiveX palette. The "To G Data" function requires a type input. You will need an ActiveX Automation Refnum control as the input to this (see ActiveX control palette). You will need to right click on this automation refnum control and browse the ActiveX automation server until you find the DLL ActiveX server from which you instantiated your object within your sequence. Once selected, also select the object that you instantiated. The "To G Data" function will then give you a reference to you object on which you can happily used in your desired manner. Make sure to close this reference with an ActiveX Automation close function when you are done with it.
    I would definitely clean this up with a subVI to perhaps generalize the solution.

  • Passing teststand sequence context to labview

    hi,
    i want to access teststand sequence context from labview , can i know how to do that ?
    -giri

    Hi,
    This is cross posted here: http://forums.ni.com/t5/LabVIEW/mapping-labview-variables-to-teststand-sequence-context/td-p/1928835
    There is another method:
    Rodéric L
    Certified LabVIEW Architect

  • Excel Get ActiveX References​.vi and closing references -- grrr

    I'm new to ActiveX stuff, but eager to learn! 
    The "grrr" in my Subject line is a reference to how I feel about LabVIEW's documentation from time to time.  I'm a dinosaur who came from text-based programming, and did a fair amount of C coding, so sometimes with LabVIEW I'm left with this awful feeling in the pit of my stomach like, "Good grief!  How much memory must LabVIEW be hogging up in the background when I use this vi?" or "What happens to those variables (wires) in that subVI when it completes but doesn't close?  What are their statuses when I come back in the next time?" or "What if I put a lot of elements into that array the first time and then started from element zero the second time and just put in a few?  What has happened with the memroy that was allocated when there were a lot of elements?"
    Today I'm stewing about this "Excel Get ActiveX References.vi," and what happens to the "ActiveX references" it generates each time I call the subVI in which "Excel Get ActiveX References.vi" lives.  I think that at least one of the "ActiveX references" it generates when I call it is of the type Excel._Application.  Then there appears to be an Excel._Workbook, and others.  You see, I've used "Excel Easy Report.vi" to put some data into an Excel spreadsheet, and I want to tell Excel to do a "Save" on the open spreadsheet.  I think ActiveX is the (a) right way to do that, so I'm wading into the ActiveX fray...  But this "Excel Get ActiveX References.vi" says in its help file, "Do not close ActiveX references opened with the Excel Get ActiveX References VI. References must remain open until the report is closed. Otherwise the error 3001 will occur."  Well, these Excel workbooks that get created by my VI could well stay open until after my LabVIEW VI terminates!
    So (finally), here are some of my quesitons:
    1)  When I go through my subVI once, pointing to one workbook, I'll get one set of references "created" or "opened" or whatever you call it when ActiveX references spring into existance.  Now, when I exit the subVI, is it going to automatically try to "close" those ActiveX references?  I don't suppose so, since subVI's stay in memory until the calling VI closes.
    2)  Now, I come back into my subVI a second time.  New workbook gets created, so I get new references.  Ok, fine.  Uh oh!  What happened to those old references?  I suppose that if I didn't somehow save them off, I've probably lost the ability to get them back (maybe I'm wrong, but I don't need them back), but is LabVIEW going to "close" those old references (from previous times through the subVI) because I can't get to them anymore?  Won't that cause the dreaded error 3001?  If LabVIEW is not going to "close" them, what in tarnation happens to them (the old C programmer in me creeping back out)??  Now it's some oddball, orphaned reference, floating out there, hogging memory, waiting to make something crash intermittently and be a debugging nightmare?
    3)  Now, here's the real scary one.  I think I might dodge the "error 3001" bullet in questions 1) and 2), but now let's say the user closes my LabVIEW application while Excel is still open.  All those workbooks are still open.  Presumably, all those ActiveX references I was not supposed to close are still open.  I really hope that LabVIEW is decent enough to close/erase/delete/blow-away (whatever the right word is) all those ActiveX references which were opened/created by "Excel Get ActiveX References.vi" when my program terminates.  But, oh no!  Won't the error 3001 come along then?  I suppose I can just dump it in the shutdown error handling.
    Well, thanks for reading my novel.  I don't know what can be done with LabVIEW documentation to make it more satisfying to folks like me, but perhaps someone can weigh in on all my ActiveX questions here.
    Thank you in advance,
    Steve Brady
    Solved!
    Go to Solution.

    You need to close EVERY ActiveX reference you open.  If you don't you'll end up with some Excel processes running even after LabVIEW exits.  You can see them in Task Manager.
    I, personally, don't like the LabVIEW Report Generation Tool Kit for working with Excel.  I don't think it's flexible enough.  I have a growing library of VIs that I've written that open, manipulate, and close Excel.  Some references I pass from VI to VI and some I close right after I use them.  It all depends on what I'm doing.  If I want to enter read or write data from/to a certain range I'll get the range reference, read or write the data, then close it right away because I have no use for it any more.  On the other hand, when I open Excel or a Workbook I keep the reference until I'm done, which could be later in the program.
    1)  When I go through my subVI once, pointing to one workbook, I'll get one set of references "created" or "opened" or whatever you call it when ActiveX references spring into existence.  Now, when I exit the subVI, is it going to automatically try to "close" those ActiveX references?  I don't suppose so, since subVI's stay in memory until the calling VI closes.
    2)  Now, I come back into my subVI a second time.  New workbook gets created, so I get new references.  Ok, fine.  Uh oh!  What happened to those old references?  I suppose that if I didn't somehow save them off, I've probably lost the ability to get them back (maybe I'm wrong, but I don't need them back), but is LabVIEW going to "close" those old references (from previous times through the subVI) because I can't get to them anymore?  Won't that cause the dreaded error 3001?  If LabVIEW is not going to "close" them, what in tarnation happens to them (the old C programmer in me creeping back out)??  Now it's some oddball, orphaned reference, floating out there, hogging memory, waiting to make something crash intermittently and be a debugging nightmare?
    3)  Now, here's the real scary one.  I think I might dodge the "error 3001" bullet in questions 1) and 2), but now let's say the user closes my LabVIEW application while Excel is still open.  All those workbooks are still open.  Presumably, all those ActiveX references I was not supposed to close are still open.  I really hope that LabVIEW is decent enough to close/erase/delete/blow-away (whatever the right word is) all those ActiveX references which were opened/created by "Excel Get ActiveX References.vi" when my program terminates.  But, oh no!  Won't the error 3001 come along then?  I suppose I can just dump it in the shutdown error handling.
    1)  No, LabVIEW will NOT close those references.  You need to make sure that happens.
    2)  You can save the references in a functional global or use a class but if you're not going to save them close them as soon as you're done with them.
    3)  Your user should not be able to close your LabVIEW application without it going through the shutdown routine you've created for your program.  The ABORT button should never be exposed to the user and you should capture and discard the panel close event so your program ALWAYS shuts down is an orderly fashion.  If you don't you will have fragments of Excel hanging around in your operating system and will have to kill those processes using Task Manager.  That should only be a problem during development, not once deployed.
    I used to program in C and Assembly many moons ago.  You should have seen my first LabVIEW code.  I go back and look at it just so I can see how far I've come in the last 12 years.  I feel your pain.
    Kelly Bersch
    Certified LabVIEW Developer
    Kudos are always welcome

  • Obtaining activex reference from activex container

    I have a VI with an embedded MediaPlayer activex object inside an activex container.  Additionally, I have a seperately run VI which I want to be able to control the MediaPlayer obejct in the first VI.  These VIs are opened seperately, so I cannot pass information directly from one to another (i.e., I can't directly pass the MediaPlayer activex reference to the second VI directly).  Therefore, the second VI obtains a reference to the activex container object by searching the first VI's controls and filtering by label.  I can typecast the control reference to the level of activex container, but from there I have no way of obtaining a reference to the object embedded in it.  Is there are way to do this?  The "To more specific class" function does not accept activex references for typecasting, and the automation open does not accept activex container references.  I've searched through the forums, and while there is plenty on activex references and containers, there doesn't seem to be anything that addresses my issue.

    I'm not 100% about whether this will work, but give it a try. Once you have a reference to the container, use the 'Value' property. This will give you a variant. From here you can use Variant to Data, connect a MediaPlayer constant reference to the type input and you should get the correct reference out.
    Also, you could simply get a reference to the VI with the ActiveX control and use the method 'Control Value: Get[Variant]' to get the value of the control instead of getting a list of all the controls and searching for the one you want.

  • Inserting sequence value from JDBC and getting the same value back

    Hi: Gurus I have a table whose primary key is a sequence. I wonder how to make sure I get the same sequence value back for current transaction so I update the other table whose foreign key is the sequence value from first table.
    E.g lets say I do this
    String query_insert = INSERT INTO table1 (column1, ....) VALUES (HIGHLIGHT_ID_SEQ.nextval, ...);
    pstmt = con.prepareStatement(query_insert);
    pstmt.executeUpdate();
    How I make sure no other transaction update the sequence value so I can read the last inserted sequence value and update the second table with this value
    String query_select = "SELECT HIGHLIGHT_ID_SEQ.currval FROM DUAL";
    pstmt = con.prepareStatement(query_select);
    Regards,
    Rashid.

    <rant>No version again. I wonder why people requiring help want to stay anonymous and never want to type their version, only 4 digits. In this case, jdbc, not only the version of the driver is important, but also it's type. Waving a magic wand again? </rant>
    Look up the returning into clause of the insert statement in the sql reference manual for your version.
    Sybrand Bakker
    Senior Oracle DBA

  • How can I get the context-parm from a web.xml file using struts?

    Hello:
    I need get the context-param from the web.xml file of my web project using struts. I want configurate the jdbc datasource connection pooling here. For example:
    <context-param>
    <param-name>datasource</param-name>
    <param-value>jdbc/formacion</param-value>
    <description>Jdbc datasource</description>
    </context-param>
    and then from any Action class get this parameter.
    Similar using a simple server can be:
    /** Initiates new XServlet */
    public void init(ServletConfig config) throws ServletException {
              for (Enumeration e = config.getInitParameterNames(); e.hasMoreElements();) {
                   System.out.println(e.nextElement());
              super.init(config);
              String str = config.getInitParameter("datasource");
              System.out.println(str);
         public void doPost(HttpServletRequest req, HttpServletResponse res)
              throws ServletException, IOException {
              // res.setContentType( );
              System.out.println("Got post request in XServlet");
              PrintWriter out = res.getWriter();
              out.println("nada");
              out.flush();
              out.close();
    but only this works for init-params, if I use
    <servlet>
         <servlet-name>MyServlet</servlet-name>
         <display-name>MyServlet</display-name>
         <servlet-class>myExamples.servlet.MyServlet</servlet-class>
         <init-param>
         <param-name>datasource</param-name>
         <param-value>jdbc/formacion</param-value>
    </init-param>
    </servlet>
    inside my web.xml. I need something similar, but using struts inside the action class for that I can get the context-params and call my database.
    Thank you

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • If an applicatio​n includes ActiveX references from Excel, should MS Office be installed on the run-time PC?

    There are many threads regarding usage of MS office with LV, but I was not able to find the answer to the following question. I hope somebody can help or point me to a useful thread.
    I have an excel template file and would like to create new reports each time from it. There are a couple of solutions for this problem which are fine. But, at the end, I am going to build an application and install it on an industrial PC which does not have MS office installed. The question is if the application works on the target machine as well.
    I am specifically pointing to the solution in here which uses ActiveX reference to Excel._Application. Any chance that this solution or any similar one works on my target PC?
    If you wonder why I want excel reports on a machine that does not have MS Office, I should say that the reports are just stored somewhere on the disk to be transferred later to headquarters let say!
    Developing machine: Win7, LV8.6 Pro + Report generation toolkit
    Target machine: WinXP SP3, LV run-time engine
    Thanks in advance!
    Soroush
    Solved!
    Go to Solution.

    You need to have Office installed on the computer that is running the LabVIEW application. It is the Office applications that provide ActiveX functionality to the Report Generation Toolkit. Without them, LabVIEW has nothing to interface to.
    http://digital.ni.com/public.nsf/allkb/02E339E2648​4F30186256E920061FBD9
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Getting a Sequence back from an S-P with typed DataSet problem

    Hi,
    I know there are loads of topics about sequences on this forum, but I can't seem to find this exact issue amongst them.
    As a learning exercise, I've created a typed dataset based on the HR sample database tables Departments and Employees (through the use of the hack to get an OracleDataAdapter to generate typed datasets).
    I currently have a problem with retrieving the new sequence value from the 'Insert_Department' stored procedure I've written, and the best thing I can figure is that there is a clash occurring between the type and size of the sequence and the size of the department_id column (number(4) - which maps in .Net to an int16).
    The exception I get on running the dataAdapter.Update() method is:
    Unable to cast object of type 'Oracle.DataAccess.Types.OracleDecimal' to type 'System.IConvertible'. Couldn't store <330> in DEPARTMENT_ID Column. Expected type is Int16
    The record does get inserted into the database ok - therefore I infer that this is a problem with the handling of the return value back to the DepartmentsDataSet column.
    My stored procedure is as follows:
    PROCEDURE "INSERT_DEPARTMENT" (
    "NEW_DEPARTMENT_ID" OUT DEPARTMENTS.DEPARTMENT_ID%TYPE,
    "NEW_DEPARTMENT_NAME" IN VARCHAR2,
    "NEW_MANAGER_ID" IN NUMBER,
    "NEW_LOCATION_ID" IN NUMBER) IS
    BEGIN
    INSERT INTO DEPARTMENTS(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)
    VALUES (DEPARTMENTS_SEQ.NEXTVAL, NEW_DEPARTMENT_NAME, NEW_MANAGER_ID, NEW_LOCATION_ID);
    SELECT DEPARTMENTS_SEQ.CURRVAL INTO NEW_DEPARTMENT_ID
    FROM DUAL;
    END "INSERT_DEPARTMENT";
    I've tried lots of different things here; I started declaring the parameter as a NUMBER, now it's set to a %TYPE on the column as you can see... and I've also tried assigning the NEXTVAL to a NUMBER(4) local variable before assigning it to the OUT parameter.
    Here's the C# that configures the insert command:
    // Insert - note that department_id param is an output param
    OracleCommand insert = new OracleCommand("odp_hr_dal.insert_department", connection);
    insert.CommandType = CommandType.StoredProcedure;
    insert.Parameters.Add(new OracleParameter("new_department_id", OracleDbType.Int16, 2, "department_id"));
    insert.Parameters["new_department_id"].Direction = ParameterDirection.Output;
    insert.Parameters.Add(new OracleParameter("new_department_name", OracleDbType.Varchar2, 30, "department_name"));
    insert.Parameters.Add(new OracleParameter("new_manager_id", OracleDbType.Int32, 4, "manager_id"));
    insert.Parameters.Add(new OracleParameter("new_location_id", OracleDbType.Int32, 4, "location_id"));
    deptDataAdapter.InsertCommand = insert;
    The key line is the adding of the "new_department_id" line where I have tried many different types in the vain hope that I can somehow override the conversion process to not think it needs to go as large as a Decimal type.
    I wonder if anyone could help point me towards the (probably obvious) thing that I am missing? I've run out of ideas on things to try!
    With Best Regards,
    Nij

    Thank you muylaerk,
    That did work.
    However, this and the related link you posted raise a question: Given that (in the case of Decimal types) whichever of the DbType or OracleDbType property you set, the other value is set to Decimal also... what setting in the OracleParameter records which was the 'set' property, and therefore, which type will the Value be set to?
    In other words, does anything visibly change in the debugger view of the OracleParameter type to see this?
    Nij

Maybe you are looking for

  • SAP  r/3 Plugin activitation or ECC5

    Hi All,         Our company is having 4.6C in our landscape. We are having PP,MM,HR,FI/CO,SD modules. We are thinking to have a PM (Plant Maintaince) module in our landscape. Please let me know whether we require any other license or reactvitation fr

  • PDF Render Garbles Text, but I can't replicate

    An acquaintance contacted me and told me that PDFs on my job market website aren't displaying correct. He sent a screenshot, so I know what he is looking at: http://bensresearch.com/downloads/FF.png (The PDF he is viewing is http://bensresearch.com/d

  • How to add dummy data to my test database ? from a newbie in need of help

    Hi all I am pretty new to oracle and i would like to mess around with it some more i just created my database (MVF) and created an test tablespace. The question now is what would be the best way to fill the tablespace with data ? can i just insert so

  • Usuario SAP conectado en Query Layout

    Hola a todos. Alguien sabe como mostrar el usuario de SAP actualmente conectado en un query layout? intente con la variable $[USER] pero no trae nada cuando ejecuto la consulta desde el query manager. No sé si alguien tuvo un problema parecido y pued

  • Firefox4 not supported on mac osx 10.5.8

    my mac os x 10.5.8 says i cannot open because my system does not support the architecture.