Error 74 in unflatten to string

Hi,
The attached VI opens a file in read\write mode. If the file doesnt exist it creates a file. The next time when the vi is run the created file is read. If the file already exists then it only reads the file. The data is a cluster which is converted to binary using flatten to string function and then written to the file using write binary file function. When I read back the file, I get the error 74.
My observation :  The flatten to string output is different from what it is written to the file. Some special character is added to the starting of the file.
But i dont face any problem when i replace the read binary file or write binary file with the read text file and write text file respectively.
Regards
Gopal
Attachments:
Default_Setup.vi ‏30 KB

The "Write to Binary File" VI has an input "prepend array or string size". Wire a False to this input and your VI will work as expected.
Side note: You seem to be relying on the "Automatic Error Handling" in LabVIEW. I would recommend not doing this, and following the convention of having an error in/error out cluster for VIs. In your VI any error that gets generated is not being passed out.

Similar Messages

  • Error 74 Unflatten from String in video streaming using TCP

    I am working on video streaming ( source: USB camera) using TCP. However, am constantly getting held up in "Unflatten from String" with Error 74 occuring stating "Memory corrupt". Kindly help me through in solving the issue.
    Attached is the VI having both the send/ recieve together and communicating using localhost. 
    Attachments:
    Image acquisition & transmit.vi ‏189 KB

    Shoaib Akhtar wrote:
    Thanks  for the reply!
    Restricting the TCP sent dta to two bytes was a mistake, that has been rectified.
    However, we are unable to resolve the "Unflatten from String". their just doesn't seem to be any sub-VI or function, that I can find which could convert the string to IMAQ image!
    Kindly help in the same!
    Best. 
    Actually at least in earlier versions of IMAQ the normal Unflatten from string should be able to createthe IMAQ image when you transmit the right data. You can try that by writing the string from IMAQ Flatten.. to a file and reading it back and unflattening. If that works, you know you are making some errors in the TCP communication.
    Message Edited by rolfk on 01-11-2010 08:37 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Error 116 at Unflatten from string.....

    Hi I want to save and load the control values of
    the tab pages I am getting the following error
    "Error 116 occurred at Unflatten From String     
          Unflatten or byte stream read operation
    failed due to corrupt, unexpected, or truncated data."
      the attached is the VI can
    anyone tell me what is wrong ….thank you
    Attachments:
    save n load example.vi ‏70 KB

    All that you need to do is right-click on the Read from Text File and Write to Text File functions and uncheck "Convert EOL".
    Other comments:
    You should not hard-code the path inside the VI. Either place a front panel control to specify the path (perhaps with a default value set), or generate the path so that it is relative to the VI (such as being in the same directory as the VI).
    You are not wiring all your errors through so some errors can be lost.
    You do not need to have the VI open a reference to itself. If you delete the Open VI Reference function the code will still work.

  • LV 8.0.1 Bug, no error when unflattening mis-matched data type

    When unflattening a string and wiring a "type" that does not match the original format of the data, sometimes I don't get an error and I get no data. I've attached a VI written in 8.0.1 that illustrates 2 examples of this. In LV 7.1 these cases did return an error, but not in 8.0.1. Can anyone offer some insight or global solution?
    Thanks, Chip
    Attachments:
    LV 8 Bug, no error trapped on mismatched type when unflattening string.vi ‏23 KB

    Good afternoon,
    Well, this certainly is an interesting situation.  In the example “Unflatten string returns data
    from previous iterations”, the second iteration of the for loop unflattens a
    string as an array of strings type, this is obviously a type mismatch so if any
    data is returned I wouldn’t expect it to be valid.  What is even more interesting, is that if you
    don’t use the auto indexing, but rather explicitly index the array there is no
    error, but the data returned is like it was in 7.x.  I tried to use the flatten function’s
    “convert 7.x data function with no luck in either case.  I filed a bug report on this issue (number
    3X0CBC3A), but it seems to me the only workaround for now is going to be just
    making sure the types match.  I know this
    is going to be inconvenient for you, and for that I apologize.
    Incidentally, in many cases I wouldn’t necessarily expect an
    error to be generated if the types don’t match. 
    This is because the flatten to string function takes your data and
    converts it to a string which is nothing more than a byte[ ] of data with some
    size information.  When you “unflatten”
    the function takes the string it is given, and attempts to reconstruct the data
    in the format that is specified by the “type” input.  If it can reconstruct the data from type,
    regardless of the data returned I wouldn’t expect it to generate an error.  Sometimes, however, an error can be detected
    – if you flatten a double-precision number and unflatten to a single precision
    number LabVIEW can detect that the incoming data represents something much
    larger than a single precision number.  I
    suppose that LabVIEW 7 did a better job checking the size of the sting before
    deciding whether or not to generate an error.
    Again, I apologize for the problems this may cause.  Please let me know if there is anything else
    I can help with.
    Travis M
    LabVIEW R&D
    National Instruments

  • CRIO: Unflatten from string into lvclass not working in deployment

    Hello,
    I am working on a problem for some hours now and I need some help.
    I am using a cRIO-9022. I need to do some tasks, and I created a couple of classes which contain the parameters and the methods. They contain using dynamic dispatch VIs. I have an array of these classes (all derived from a parent class) which is my "configuration". I am using "flatten to string" and saving those file on disk. "Unflatten from string" is working fine. These file is created on a LV WIndows Application.
    I need to use this file on my cRIO: Unflatten from string, and then work with the array of my classes. When running the cRIO Main VI it's working fine. But when building the application and deploying it as startup, it's not working. I am getting:
    Error 1403 occurred at Unflatten From String in Gantry CommEngine.vi->RT Main.vi
    Possible reason(s):
    LabVIEW:  Attempted to read flattened data of a LabVIEW class. The data is corrupt. LabVIEW could not interpret the data as any valid flattened LabVIEW class.
    What I tried so far:
    - Added the whole lvlib containing the classes and also every single class to "Source files / always included".
    - Created constants of the array (containing the classes) to the VI (forcing LV to include the classes?)
    - Loaded the file from cRIOs flash and also by shared variable
    What else can I do?
    Thanks a lot for support!

    I tried to reproduce the matter, but couldn't. 
    I attached my example to the post. 
    What it does:
    It creates a class with only a string a bool and a number. This class oblect is saved to C:/somename.xml. The number is a random number.
    In the second case the same file is read and the number broadcasted to a variable.
    It worked quite fine building it as a startupexe.
    Nothing else was necessary. Does it work for you?
    Attachments:
    class exe.zip ‏45 KB

  • Unflatten from string takes long time to execute in x64

    Hi All,
    I am running into an issue where "Unflatten from String" is taking enormous amout of memory n time in LV 2012 SP1 x64 to execute. I pass in a NOT flattened string to this function and it consumes ~5 Gigs of memory and takes more than 10 minutes to execute it. On x86, it executes almost instantly.
    It only happens if the input is not a flattened string. 
    Is this a known bug?
    I have attached the vi here for you to see the problem. If you run it on x64, it might take more than 10 mins to execute and your system will be in a hung state. 
    Ritesh
    Attachments:
    Flat String to Data bug.vi ‏9 KB

    LVCoder wrote:
    With "x64" I meant LV x64. It executes instantly on LV x86 running on Win 64 bit but on LV x64 it takes like eternity. 
    I know it cannot unflatten it and I want it to return an error. My actual code can receive a flattened or NOT flattened string and I have a case structure which handles different strings differently. 
    Be careful with that terminology, it only applies to the Windows Operating System with respect to 32-bit and 64-bit processors.  There is no such thing as LabVIEW x64, or LabVIEW x86.  The property terminology is LabVIEW 32-bit (the most common one, most people use, even on 64-bit OS's since it is the most fully supported), and LabVIEW 64-bit (not commonly used, doesn't have full support of all add-on modules and toolkits, and is mainly only used by people who need LabVIEW to analyze very large datasets.)

  • Whats happening internally within the unflatten from string function?

    I am getting unflatten from string error intermitently in my program. I can't post the program to get help but essentially I am storing a GOOP object reference as a string. The reference is flattened to a string and stored upon creation, at a latter time the string is then unflatterned to retrieve the reference and then the data. This works most of the time but occansionaly the unflatterned from string function fails. Prior to passing the string to the function I am checking that the string isn't null. I am assuming something else is corrupting the string prior to passing to this fucntion and would like to know what would trigger the error in the function as it may help me realise what is happening
    prior.
    Cheers,
    Wayne

    Hi,
    It really seems strange this problem, but one thing that might be the cause is how you store the flatten string. You do not mention that. I have once had problems when storing GOOP references as a sting and passing them between test VIs in TestStand using a string parameters in TestStand. A flatten string might have special chars that not all applications (such as TestStand parameters) can handle that and just trunkate the string when such a char is present, mistakenly inteprets that as end of string. Have you tried to check that string length is the same?
    However to make sure you get rid of all problems with string termination, you really should cast your GOOP reference into something else. I would instead cast the reference to an U32, or
    if you want, to solve the string problem for other types than GOOP reference, then flatten the type into string and then convert the string to an array of U8 before storing it. This would by sure solve your problem.
    Regards,
    Mattias Ericsson
    Endevo
    Sweden
    Main developer of the new GOOP2 and GOOP Wizard 3.
    PS! Have you seen that there is a new GOOP release that also may handle inheritance? Please check out: http://www.endevo.se/default.asp?lang=eng and click on "Products". There are examples, demos and white papers describing the new GOOP Inheritance Toolkit.
    Attachments:
    CastRefExample.vi ‏18 KB

  • Bug in "Unflatten from String" (LV7)

    I have binary files with different versions of a certain datatype. When loading a file, I try to unflatten the data using the newest dataversion. If I get an error, I try the 2nd newest dataversion and so on until I found the right datatype. This methode was ok up to LV6.01.
    Now I updated to LV7.0ger and I found following bug:
    When unflatting certain binary datas from string I get an error msg window "Nicht genügend Speicher zum Abschließen dieser Operation". The error-output of the vi is incorrect.
    Does anybody know a workaround of that bug?
    You can test the bug with the attached vi. Include also the two typedefs.
    Attachments:
    f_mancalib_UnflattenTypeCalibList.vi ‏184 KB
    f_mancalib_TypeCalibrationParams.ctl ‏24 KB
    f_mancalib_TypeCalibrationList.ctl ‏28 KB

    Hi,
    From the LV's help: "National Instruments recommends reworking any
    application that uses the Convert 4.x Data mode as a long term solution.".
    Data types may vary with differenct versions of LabVIEW. So, if types are
    not the same, this does not need to be a bug. Right click the Unflatten From
    String, and select Convert 4.x Data. This might not work, because the data
    is stored with Lv 5 or 6, but when you get it working, it will keep working
    for future versions of LV.
    The attached VI shows that a sting in a cluster does not convert to the same
    type string for lv4.x and lv7. Perhaps they are the same for lv4.x and lv6.
    If so, using convert 4.x data would be sufficient. If not, you need to read
    the data in 6, save the binary 4.x strings
    , and use 4.x from then on.
    You might also do the following: (also from the help) "If you use this
    function to flatten data from a custom control or indicator that you saved
    as a type definition, the function strips the type definition of its type
    definition wrapper. If you do not want to strip this wrapper, right-click
    the function and select Expose Typedefs from the shortcut menu."
    Regards,
    Wiebe.
    "albertz" wrote in message
    news:[email protected]..
    I allready told this to a NI tech support in Germany. They told me,
    the bug is known, but they do?nt have a workaround.
    So I hope for LV7.1 or maybe LV7.01.
    [Attachment Different Types.vi, see below]
    Attachments:
    Different_Types.vi ‏22 KB

  • How can I put all output error message into a String Variable ??

    Dear Sir:
    I have following code, When I run it and I press overflow radio button, It outputs following message:
    Caught RuntimeException: java.lang.NullPointerException
    java.lang.NullPointerException
         at ExceptionHandling.ExceptTest.actionPerformed(ExceptTest.java:72)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:291)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6038)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
         at java.awt.Component.processEvent(Component.java:5803)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4410)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2429)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)Caught RuntimeException: java.lang.NullPointerException
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)I hope to catch all these error message into a String Variable such as StrErrorMsg, then I can use System.out.println(StrErrorMsg) to print it out or store somewhere, not only display at runtime,
    How can I do this??
    Thanks a lot,
    See code below.
    import java.awt.Frame;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.FileInputStream;
    import javax.swing.ButtonGroup;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JRadioButton;
    public class ExceptTest extends JFrame implements ActionListener {
        private double[] a;
      private JRadioButton divideByZeroButton;
      private JRadioButton badCastButton;
      private JRadioButton arrayBoundsButton;
      private JRadioButton nullPointerButton;
      private JRadioButton negSqrtButton;
      private JRadioButton overflowButton;
      private JRadioButton noSuchFileButton;
      private JRadioButton throwUnknownButton;
      public ExceptTest() {
        JPanel p = new JPanel();
        ButtonGroup g = new ButtonGroup();
        p.setLayout(new GridLayout(8, 1));
        divideByZeroButton = addRadioButton("Divide by zero", g, p);
        badCastButton = addRadioButton("Bad cast", g, p);
        arrayBoundsButton = addRadioButton("Array bounds", g, p);
        nullPointerButton = addRadioButton("Null pointer", g, p);
        negSqrtButton = addRadioButton("sqrt(-1)", g, p);
        overflowButton = addRadioButton("Overflow", g, p);
        noSuchFileButton = addRadioButton("No such file", g, p);
        throwUnknownButton = addRadioButton("Throw unknown", g, p);
        getContentPane().add(p);
      private JRadioButton addRadioButton(String s, ButtonGroup g, JPanel p) {
        JRadioButton button = new JRadioButton(s, false);
        button.addActionListener(this);
        g.add(button);
        p.add(button);
        return button;
      public void actionPerformed(ActionEvent evt) {
        try {
          Object source = evt.getSource();
          if (source == divideByZeroButton) {
            a[1] = a[1] / a[1] - a[1];
          } else if (source == badCastButton) {
            Frame f = (Frame) evt.getSource();
          } else if (source == arrayBoundsButton) {
            a[1] = a[10];
          } else if (source == nullPointerButton) {
            Frame f = null;
            f.setSize(200, 200);
          } else if (source == negSqrtButton) {
            a[1] = Math.sqrt(-1);
          } else if (source == overflowButton) {
            a[1] = 1000 * 1000 * 1000 * 1000;
            int n = (int) a[1];
          } else if (source == noSuchFileButton) {
            FileInputStream is = new FileInputStream("Java Source and Support");
          } else if (source == throwUnknownButton) {
            throw new UnknownError();
        } catch (RuntimeException e) {
          System.out.println("Caught RuntimeException: " + e);
          e.printStackTrace();
          System.out.println("Caught RuntimeException: " + e);
        } catch (Exception e) {
          System.out.println("Caught Exception: " + e);
      public static void main(String[] args) {
        JFrame frame = new ExceptTest();
        frame.setSize(150, 200);
        frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
        frame.show();
    }

    yes, I update as follows,
    but not looks good.
    import java.io.*;
    public class UncaughtLogger implements Thread.UncaughtExceptionHandler {
        private File file;
        private static String errorMessage;
        public UncaughtLogger(File file) {
            this.file = file;
            //Thread.setDefaultUncaughtExceptionHandler(this);
        public UncaughtLogger(String str) {
            this.errorMessage = str;
            Thread.setDefaultUncaughtExceptionHandler(this);
        //@Override()
        public void uncaughtException(Thread t, Throwable e){
            try {
                log(e);
            } catch (Throwable throwable) {
                System.err.println("error in logging:");
                throwable.printStackTrace();
        private void log(Throwable e) throws IOException {
            PrintWriter out = new PrintWriter(new FileWriter(file, true));
            try {
                e.printStackTrace(out);
            } finally {
                out.close();
        private static UncaughtLogger logger = new UncaughtLogger(new File("C:/temp/log.txt"));
        private static UncaughtLogger logger2 = new UncaughtLogger(errorMessage);
        public static void main(String[] args) {
                String s1 = "Hello World!";
                s1 = null;
                String s2 = s1.getClass().getName();
                System.out.println(s1);
                System.out.println(s2);
                System.out.println("errorMessage =" + errorMessage);
    }

  • Write to Text File - unflatten channel string

    Hi all,
    This is my first post on the forums!  It's been very helpful for me but I have not been able to find a solution to my (simple) problem.
    Operating system: Windows 7 (64-bit)
    Labview 2012 Full Development
    I'm using the DAQmx unflatten channel string to get the names of the channels, and when I Write to Text File, I get the names of channels to be displayed vertically, ie a new row for each channel in a column.  I'd like to "transpose" this, but obviously you cannot transpose a 1d array.  Any ideas on how I can do this?
    Any and all ideas are appreciate, thank you in advance,
    -AK
    Solved!
    Go to Solution.

    Show us how you are doing this.
    My guess is that once you get the data, you have linefeed characters separating the channel names rather than some other delimiter such as a comma or a tab.
    Depedning on how you are going from the channel names to the file (a string, an array of strings, Write to Spreadsheet File, Write to Text file, ....) will determine the best way to fix the problem for you.

  • How does "Unflatten From String" take a type and return a value of that type?

    http://zone.ni.com/reference/en-XX/help/371361E-01/glang/unflatten_from_string/
    How exactly does the "type" argument for "Unflatten From String" work? I need to create a VI that takes a type, passes it as an argument to several calls of the "Unflatten From String" function, and returns an array containing elements of the type originally passed. The "Unflatten From String" function seems to do some magic though, because the type of the "value" that it outputs changes depending on the type it is passed as input. How do I do the same magic in my VI?
    Ultimately, what I need to accomplish is an unflatten-list operation. Given a type T and a byte string of length L (which contains a concatenation of T elements that are flattened to their bytes), create a VI that unflattens all the types in the string and return an array of length (L / sizeof(T)) that contains each type.
    Note: performing the unflatten-list operation is trivial, but I cannot for the life of me figure out how to do it in a VI that takes a type and returns an array of the appropriate type. By the way, my data is being given to me from another source, so please don't bother suggesting that I should be flattening an array using LabVIEW's "Flatten To String" function in the first place. My data is not given in LabVIEW's array format: http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/flattened_data/
    Thanks a ton!
    -Wakka

    Take a look at this example:  You can see that the flattened string contains several bytes.  The first four bytes contain the length of array (number of elements).  Since the data type is U32, the next 32 bits (4 bytes) contains the value of the first element, and so on.  Could you possibly use this scheme to do what you want to do?  Other data types present different outputs.  You would have to experiment with them.
    - tbob
    Inventor of the WORM Global

  • Error writing the handshake string to the newly established connection. (02

    Hi
    I am having problems connecting from my Master to the Local Distributor server both on Solaris 10
    I am using ssh with ssl and select encryption, no authentication on the Master
    I was able to ssh from master to LD with prompt
    I check the path it was correct
    When I installed the LD I specified ssh
    I turn on the Debug and got the following results
    Debug from SPS Viewing Host Information
    Trace route to 10.233.12.38:70001 failed. (022167)
    Error writing the handshake string to the newly established connection. (022181)
    Connection handshake failed, invalid handshake string. Ensure that the path to the N1 Service Provisioning System application is correct, the application is configured to accept ssh connections and that you can ssh to the machine without any prompts.
    [debug1: channel 0: obuf empty, debug1: channel 0: close_write, debug1: channel 0: output drain -> closed, debug1: channel 0: almost dead, debug1: channel 0: gc: notify user, debug1: channel 0: gc: user detached, debug1: channel 0: send close, debug1: channel 0: is dead, debug1: channel 0: garbage collecting, debug1: channel_free: channel 0: client-session, nchannels 1, debug3: channel_free: status: The following connections are open:, #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1), , debug3: channel_close_fds: channel 0: r -1 w -1 e 7, debug1: fd 0 clearing O_NONBLOCK, debug1: fd 1 clearing O_NONBLOCK, debug1: fd 2 clearing O_NONBLOCK, debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds, debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0, debug1: Exit status 1](022138)
    Debug from cr_server.out
    2007-07-12 15:49:57,342 ERROR [Connection [127.0.0.1305]-[10.233.12 .38:70001]:Reader] com.raplix.rolloutexpress.net.transport.Connection$Rea
    dThread (Connection.java:515) - Exception when reading from connection in
    put:Connection [127.0.0.1:98305]-[10.233.0.38:70001]:Closing connecti
    on:
    Unable to make connection handshake using data, "0". (022195)
    Ok what am I mssing

    Hi,
    I am not quite sure where exactly you get an error. Are you trying to prepare an agent that connects to your newly installed LD?
    You did mention the following:
    I was able to ssh from master to LD with promptDo you mean you could login from the MS to the LD without password and got the OS prompt? What you have to make sure is that your ssh authentication works for the n1sps user (or whatever you have chosen during installation) from MS to LD and from LD to RA. That involves copying the public key from the MS n1sps user to the .ssh/authorized_keys files on the LD and RA. And after that, you should check the connections manually:
    1. From the MS: ssh <LD> ls -al
    2. From the MS: ssh <LD> ssh <RA> ls -al
    These both commands should work without any prompts and after that, you shouldn't get any error messages in SPS anymore.
    HTH,
    Michael

  • How to access error description in a string from error code returned by NI-DAQ driver?

    I am tring to write codes to control NI-6703 for PCI using the NI-DAQ driver for C++.
    In the sample codes, it calls "NIDAQErrorHandler" to retrieve the error description and display in the pop-up message box. The method is included with header file "nideqex.h", and implemented w/ the nidex32.lib
    I would like to get the error description in a string rather than getting a message box. Is there a way to do that? Am I missig something here?
    I managed to find the "NIDAQEx.c" source code on the internet, but it seems like the code is outdated, and the library is NOT really compiled from it, since it does not seems to have a call to any method that will return th
    e error description in a string that got used to be displayed in the message box.
    Is there a method that I can call and pass a error code, which will return the error description in a string?

    There is a function documented in dataacq.h called GetNIDAQErrorString that accomplishes what you would like.
    Raecine Meza
    NI
    http://www.ni.com/ask

  • Error PLS 00363  expression "string" cannot be used as an assignment target in sentence SELF.ATTRIBUTE1:=PARAMETER;

    Hi everybody. I wrote de following  type
    create or replace TYPE ALMACEN AS OBJECT
      id_almacen number(10),
      descripcion varchar2(40),
      existencias number(6),
      precio number(4),
      member function movimiento (p_num number)  return boolean
    create or replace TYPE BODY ALMACEN AS
      member function movimiento (p_num number)  return boolean AS
      v_inf boolean;
      n number(6);
      BEGIN
        if self.existencias+p_num>=0 then
        self.existencias:=existencias+p_num;
        return TRUE;
        else return FALSE;
        end if;
      END movimiento;
    END;
    I have Oracle 11g release I.
    In previous releases it worked, but now SQLDeveloper marks
    self.existencias:=existencias+p_num;
    Error PLS 00363  expression "string" cannot be used as an assignment target in sentence
    Please, What's wrong?
    Thanking in advance

    Hi,
    Not quite a PL/SQL XML question but anyway...
    Since the member function modifies the object instance, the implicit argument "self" must be declared explicitly as "IN OUT" :
    member function movimiento (self in out nocopy almacen, p_num number)  return boolean

  • How do I unflatten from string to an array of strings in labwindows

    New to Labwindows so please forgive.  I am trying to use STM to read messages from an existing LabView program.  I am using ClientTCPCB from the example that came with the STM library, but it reads in doubles, I want to read in strings.  I can see that I have the correct number of elements in my receive buffer, but I can't figure out how to convert the receive buffer into an array of char arrays (or strings as it were) something like labview's "unflatten from string" with 1-d array of strings as the type.

    So I figured it out... from the lack of info on the web and forums I doubt it will be useful to anyone else, but will post a brief solution.
    So I dumped the raw bytes to a file to look at how they are packed.  The first 4 bytes (int) is the number of strings in the message.  The next 4 bytes (int) are the number of chars that follow, then the corresponding chars, sans any null term character, then the very next int would be the number of chars in the next string and so on and so forth.  So I ended up writing my own charArrUnflatten function.  Anyway, after all this I might try to recode everything to use network vars.  Cheers.

  • Error message :ORA-01704: string literal too long

    Hello:
    I need your help. I have a long long string must be insert to
    database. I use long data type and long varchar data type to
    define table. But I got the error messages is ORA-01704: string
    literal too long when I insert data. Please tell me the solution.
    Thank you so so much.

    Hello,
    I have a table with a column "XML_Data" of type CLOB.
    I am trying to insert XML of the size 59975. I
    get a error message ORA-01704: string literal too
    long.
    How to enter that large XML??
    Regards,
    Sanjeev.Try using Oracles XMLDB, by dropping the XML file into the XMLDB WebDAV area and then you can access it directly through the database "resource_view". No limits on file size whatsoever.
    If you're using XML within an Oracle database you're better off doing things this way as it gets stored in an XMLType column (sys.xmltype) which is a superset object of the CLOB datatype, providing all the object methods you need to navigate, update and query your XML. You won't be able to do much with it just sitting in a CLOB column without re-writing the wheel that Oracle have already built.
    ;)

Maybe you are looking for