Why is performance so slow reading binary data from a SQL Azure DB with EF6.x

I'm running a WPF client that hits a SQL Azure DB using EF 6.x. For the most part, everything seems to be working fine. The one exception is when I try to read a large binary column.
I am storing files in the DB as a binary column.  When I test using the local DB, everything sings.  When I switch to the Azure DB, I get timeouts when I try to read the file contents.  I have no problem saving the binary data to the DB, just
reading it.
I don't know how to troubleshoot this.  I looked at the Query Performance page in the Azure portal, but it doesn't time stamp anything in there and you can't clear it, so I can't correlate what's running with the queries that show up there.
I tried to start SQL profiler against the DB, but was denied because I'm not a member of the sysadmin fixed server role.
If I query for the data directly, it comes back quickly.  So this seems to be an Azure via EF issue.
Any help is appreciated.
http://digitalcamel.blogspot.com/

Hi Digital Camel,
Since I don't know what your scenario is, I won't argue too much about not storing binaries in your SQL DB, but still: don't store binaries in your SQL DB :). The main reason is simple: first and foremost, in both the current and future pricing tier your
levels are defines on the size of the DB. Basically, you pay way more by storing your binaries on your SQL layer rathern than storing them elsewhere, such as Azure Storage. Second, the protocol your binaries would be downloaded over the wire is prone to network
connectivity issues: you could use HTTP(S) or FTP instead, if you'd use Azure Storage. Last but not least, when you download the binary from your DB, you keep a connection open which in the end is a connection other users might have used to query data instead.
However, in regard to your question, how did you "query for the data directly"? Did you try to query the data using SSMS with the Client Statistics option on? This could tell you if the problem is network, server or client related.
Hope this helps!
Alex

Similar Messages

  • Encoding problem while reading binary data from MQ-series

    Dear all,
    we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
    The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
    It seems to us that
    1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
    2. Both CCSID parameters are not used anyway in JMS-adapter
    How can we solve this problem without changing anything on MQ-site?
    Here is the stack-trace:
    Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
        at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
        at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
        at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
        at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
        at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
        at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
        at java.lang.Thread.run(Thread.java:770)
    Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
        ... 36 more
    Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
        at java.io.InputStreamReader.read(InputStreamReader.java:208)
        at java.io.BufferedReader.fill(BufferedReader.java:153)
        at java.io.BufferedReader.readLine(BufferedReader.java:316)
        at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
        at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
        ... 40 more
    Any ideas?
    Kind regards, Stefan

    Hi Stefan,
    for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
    The second MTB, which does the XML-Wrapping, is configured like this:
    Transform.Class = com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType = application/xml
    xml.conversionType = SimplePlain2XML
    xml.fieldNames = value
    xml.fieldSeparator = §%zulu§%
    xml.processFieldNames = fromConfiguration
    xml.structureTitle = payload
    Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
    Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á).  E1 is (different from ISO) an "ß" in 850.
    Any ideas?

  • Reading binary data from a URL

    Below are 2 snippets of code that read data from a binary file. A small sample of the output is shown at the bottom of each code fragment. The first one uses the URL class to read a remote file. The ouput for this fragment is incorrect in some cases. The second uses a stream reader to read a local file (the output is correct in this case). Both fragments read the same file.
    As you can notice, some of the bytes read are the same in both cases. Some others are not.
    I hope you can suggest how I can fix my URL version.
    Thanks for your help.
    Miguel
    Program A: Reads a remote file with URL
    URL url = new URL("http:localhost//myfile.awg");
    URLConnection connection = url.openConnection();
    BufferedReader bin = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    while(true) {
    System.out.println(Integer.toHexString(bin.read()));
    7d 3 0 0
    22 30 3 3e
    fd b9 2a 0
    b2 2 0 1
    Program B: Rads a local file
    DataInputStream din = new DataInputStream(new BufferedInputStream
    (new FileInputStream("c:\\inetpub\\wwwroot\\myfile.awg")));
    while(true) {
    System.out.println(Integer.toHexString(din.read()));
    8e 3 0 0
    99 30 3 3e
    81 b9 2a 0
    b2 2 0 1

    What can I use instead?
    Thanks,
    MiguelBufferedInputStream as in Program B.

  • Reading/Writing Data from a SQL Database

    Hi,
    I have a data structure called 'Quote' which contains a number of different variables and controls ranging from text boxes, check boxes and radio buttons, i need to be able to read and write this from a database.
    First I think a description of my overall project is needed:
    Project Description
    I have been given a brief that basically says: i have to create a programmed solution in VB to solve a problem. This problem can be anything we like, and I personally have chosen to create a program that manages quotes for building Log Cabins (this is very contrived and far from anything someone would do in the real world).
    My solution will allow a generic user to create a quote (using a form with controls such as text boxes, check boxes, radio buttons) , and then save this to file. These users may then wish to load/edit this quote at a later date, from another form.
    Whilst completing this project, i'll only have up to about 5 records (quotes) within the system, so i dont need the ability to store hundreds of records. And each record will be relatively short, with only about 10-15 data items within the data structure.
    Also the Admin (or business owner in this case) need to be able to view all saved quotes in a presentable format, and edit them if needs be, from within this same program.
    This solution does not need to be absolutely perfect and 100% efficiently coded, or have all the bells and whistles a real-world program would have. This is for an A level computing project by the way.
    So basically, i need to be able to read from the database (to populate a Data Grid (i imagine this is best way?)) and so Admin can access any quote and edit it (editing is not vital, but viewing/printing is. Maybe i should stop at just viewing any quote?). Also i need generic users to be able to fill in the Edit Quote form and then save this data into the database.
    And is a data structure really required for me to use a database?
    I've never used databases in VB before (but have used them elsewhere, mainly Access) and so am completely new to this. Any help will be much appreciated.
    Thanks

    this is just a dataset i created using the dataset designer.
    OK, so i have the dataset called "MyDataSet".
    I also have the following variables:
    Code Snippet
    Dim FloorSpace As Int32
    Dim NoOfBedrooms As Int32
    Dim NoOfBathrooms As Int32
    Dim EnSuites As Int32
    Dim LuxKitchen As Boolean
    Dim LuxCabin As Boolean
    Dim Flooring As Boolean
    Dim VoiceLighting As Boolean
    Dim SolarPanels As Boolean
    Dim IntegralSound As Boolean
    Dim WindowFrames As String
    Each of which relates directly to a column in the dataset (data type matches too).
    What i need to do now, is to save these variables as an additional record in MyDataSet. And then save MyDataSet to file, so it can be loaded again next time the program is run and more additional records added. (all files are local by the way).
    how would i go about this?

  • Is there an efficient wrapper class for reading binary data in cocoa/iPhone

    Hi,
    I need to read a data from a binary file in my iPhone application. What is the best way to do it? Is there an efficient cocoa wrapper class for this purpose?
    Thanks,
    Nava

    A char is a 16-bit unsigned value - depending on what you want, it may help.
    I don't understand your reluctance to mask off the upper 16 bits of an integer; all it requires is a single bitwise 'and' statement. I challenge you to measure the impact of such a statement on your program.

  • Regarding reading the data from the files without using Stremas

    hai to all of u...
    here i have a problem where i have to read the data from the files without using any streams.
    please guide me how to do this one,if possible by giving with an example
    Thanks & Regard
    M.Ramakrishna

    Simply put, you can't.
    By why do you need to?

  • Reading aggregated data from a cube/multiprovider

    Hi BI people
    My project is currently looking for a functionmodule that reads aggregated data from a cube/multiprovider.
    I already have a functionmodule that reads data from a cube and returns it in a flat format. I have debugged this, but have not found any flags that can enable the OLAP functionality needed to perform the aggregation. The functionmodule is "RSDRI_INFOPROV_READ_RFC".
    The situation is that I need to apply the aggregation logic of a profit center hierrarchy to the data I read from RSDRI_INFOPROV_READ_RFC, this means manually replicating the the OLAP engine functionality (keyfigure aggregation exception, ect.) and this is not an option with the available time/budget.
    Please have a look at the example below:
    Say that I have a profit center hierarchy as displayed below (with postable nodes).
    PC1 - $10
         |---- PC2  - $30
         |---- PC3  - $20
    The data I'm getting back from the functionmodule RSDRI_INFOPROV_READ_RFC looks like this:
    PC1 $10
    PC2 $30
    PC3 $20
    But I need the data aggregated. An aggregation utilizing the hierarchy above will make the data look like this:
    PC1 $60
    PC2 $30
    PC3 $20
    Instead of building an aggregation program, it would be usefull if it was possible to extract aggregated data.
    Any comments appreciated.
    Regards
    Martin

    Thx Olivier,
    The problem is that I need a functionmodule that can apply the OLAP aggregation for a hierarchy to the data outpu from RSDRI_INFOPROV_READ_RFC.
    ... or the best alternative would be if there were a fm/class that could provide me with the hierarchy aggregation of the data.
    /Martin

  • Reading the data from dataset

    Hi all,
    Can i read the Data from more than one Dataset at a time ?
    If yes.. How ? If not...Why ?
    Thanks in Advance
    Krish...

    You can open up to 100 datasets at the same time for every internal session.
    For stability, put a TRY...CATCH...ENDTRY on these exceptions:
    CX_SY_FILE_OPEN
    CX_SY_TOO_MANY_FILES
    ...like this:
    TRY.
    OPEN DATASET sapfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    [your code]
    CATCH: cx_sy_file_open,
           cx_sy_too_many_files.
    ENDCATCH.
    CLOSE DATASET sapfile.
    Hope this helps.

  • How to extract binary data from a File?

    Hello there!
    Hope I'm right here.
    I have a slight problem with a file containing text- and binary-data. At the beginning of the file is only some text followed by some html-code and at the end is some binary stuff like a pdf oder an image (jpg/gif).
    My problem is now how to split these parts and save them in the suitable format. The text and the html are no problem, but I don't know how to extract the binary data. I tried it out with an Inputstream, but I don't know how to find the exact position where the binary data begins.
    Anyone have an idea how I can solve this?
    Thanks in advance and sorry for my bad english.

    I don't believe a bullet-proof solution exists.
    If you know where the HTML ends, you may skip whitespace and then assume the rest is binary data. Or, if you know the first bytes of the binary data, you may locate those. With either of these solutions, though, you risk coming across a file where it doesn't work as expected, for example if the first byte of the binary data happens to match a whitespace character.

  • How to reduce the run time of ABAP code (BADI) when it is reading huge data from BPC Cube and thus writing  back huge data to the cube.

    Hi All ,
    In Case of reading huge amount of record from BPC Cube  from BADI code , performing calculations and writing back huge amount of data into the cube , It takes lot of time . If there is any suggestion to read the data  from Cube  or writing data into the cube using some Parallel Processing  methods , Then Please suggest .
    Regards,
    SHUBHAM

    Hi Gersh ,
    If we have a specific server say 10.10.10.10 (abc.co.in) on which we are working, Then under RZ12 we make the following entry  as :
    LOGON GROUP          INSTANCE
    parallel_generators        abc.co.in_10         ( Lets assume : The instance number is 10 )
    Now in SM59 under ABAP Connections , I am giving the following technical settings:
    TARGET HOST          abc.co.in
    IP address                  10.10.10.10
    Instance number          10
    Now if we have a scenario of load balancing servers with following server details (with all servers on different instance numbers ) :
    10.10.10.11   
    10.10.10.13
    10.1010.10
    10.10.10.15
    In this case how can we make the RZ12 settings and SM59 settings such that we don't have to hardcode any IP Address.
    If the request is redirected to 10.10.10.11 and not to 10.10.10.10 , in that case how will the settings be.
    I have raised this question on the below thread :
    How to configure RZ12  and SM59 ABAP connection settings when we have work with Load Balancing servers rather than a specific server .
    Regards,
    SHUBHAM

  • Kinect Explorer WPF C# read depth data from the file and conversion to skeleton

    Hello,
    I am using Kinect sensor to do some research on biometrics. Since it is impossible to find people to collect some samples, I would like to use samples from the TUM - GAID database, where there exist Color View and Depth View (in .raw format) samples. Therefore,
    I need to read these samples from the file and do a batch processing, instead of performing real-time collecting of samples (where I can take automatically the Skeleton view using the Kinect SDK). So, I need help on
    1. Reading the data from the file (instead of activating the Kinect sensor) and give this data as an input for conversion to a skeleton
    2. Read the .raw files 
    Thank you very much
    Kind regards

    Hiya,
     I doubt this forum, C Sharp, will provide much help. You are asking about the Kinects system not C#
    language. However, you can try this link; http://kinectforwindows.codeplex.com/
    Hope this help. Thanks :)

  • I use LabVIEW 7.1 but I have some problem when, I use LabVEW to read the data from serial communication

    I use LabVIEW 7.1 but I have some problem when, I use LabVEW to read the data from serial communication.
    I use LabVIEW to read the data from serial communication then, i open the example (.vi) from Serial Communication - Advanced Serial Write and Read  from LabVIEW Example. BUT it have some error message that : Error - 1073807202 occured  at property node in visa configure serial port (instr).vi -> advance serial write and read .vi
    this error code is undefined. no one has provide a description for this code, or you might have wired a number that is not an error code to the error code input.
    I don't know why? please help me. thank you.

    When I copy that code into "Explain Error" I get: "VISA:  (Hex 0xBFFF009E) A code library required by VISA could not be located or loaded."
    You may have a bad install of VISA or the wrong version of VISA loaded. Try re-installing VISA. You can get the latest version from the NI support site: http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C0E91?opendocument&node=1....
    Also ensure that you are not pointing the example towards a serial port that does not exist.
    Please let us know what you find and what gets this working for you.
         Rob

  • Reading binary content from HTTP?

    As long as i read text (ascii) data from a HttpURLConnection, the resulting stream (written to a file) is okay (readable). but when i want to read a PDF file with the same code, the written output file is not readable with the Acrobat reader (file type not supported or file corrupted):
                    //read data from HTTP server:
                    InputStream is = null;
                    HttpURLConnection con = null;
                    try {
                        System.out.print(key+": connecting ...");
                        con = (HttpURLConnection) url.openConnection();
                        if (con instanceof HttpsURLConnection) { //HTTPS URL?
                            //avoid "java.io.IOException: HTTPS hostname wrong:  should be <217.5.135.142>"
                            ((HttpsURLConnection) con).setHostnameVerifier(new HostnameVerifier() {
                                public boolean verify(String hostname, SSLSession session) {
                                    return true;
                        System.out.print(" reading ...");
                        try {
                            is = con.getInputStream();
                            try { //in case input stream is compressed via GZIP:
                                is = new GZIPInputStream(is);
                            } catch (IOException ioe) {
                                //ignore (input stream is not GZIP compressed)
                        } catch (IOException ioe) {
                            System.err.println("Error getting input stream. HTTP return code: "+con.getResponseCode()+" ("+con.getResponseMessage()+"). "+ ioe);
                            return;
                        IOUtils.writeStream(is, os);
                    } catch (Exception e) {
                        System.err.println("\nError getting content from URL: " + e);
                        return;
                    } finally {
                        if (is != null) { try { is.close(); } catch (IOException ioe) { ioe.printStackTrace(System.err); } }
                        if (con != null) { try { con.disconnect(); } catch (Exception e) { e.printStackTrace(System.err); } }
                        if (os != null) { try { os.close(); } catch (IOException ioe) { ioe.printStackTrace(System.err); } }
                    }when i open the written pdf file with a text editor, i noticed the the first line is
    DF-1.4
    so, the first character "P" is missing. but even when i add the "P" in the text file and save it, Acrobat Reader shows the same error.
    is there another way to load binary data from a HttpUrlConnection and/or write it to a file?

    yes, it's simple and works with text/ascii content from URLS:
         public static void writeStream(InputStream inputStream, OutputStream outputStream) throws IOException {
            if (inputStream != null && outputStream != null) {
                int count;
                byte[] bytes = new byte[128];
                while ((count = inputStream.read(bytes, 0, bytes.length)) != -1) { //use full read() method for GZIPInputStream to be treated correctly
                    outputStream.write(bytes, 0, count);     
        }//writeStream()it's pdf content that doesn't work (completely). the first two characters "%P" are mssing. if i add them by hand (e.g. my writting this two characters to the outputSTream before continuing with the PDF content), the resulting file is okay (can be read by acrobat reader).
    perhaps, some inner Java class misinterpret the "%P" characters as a special code sequence?

  • TS4062 Why won't my outlook calendar show data from my iPhone calendar after synching.

    Why won't my outlook calendar show data from my iPhone calendar after synching?

    I have the same problem - between the issue I had with restoring after the upgrade (Error -48), the duplicate entries I now get between my Outlook appointments and iCloud, and the inability to have Events added from the iPhone sync to Outlook, I'm surprised there hasn't been more outcry about 5.0x! Not to mention the battery problem, which I HOPE they ironed out.

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

Maybe you are looking for

  • Live Video Camera Feed To ATV?

    I have a video camera with an HDMI receptacle in it.  How can I get a live video feed from the camera to ATV?

  • Eail content of type html is dependent on which parameters?

    Hi, I have to parse email content which is of type html. I have to take the reply message given and put that in database. Sometimes the reply message is put in DIV tags and some times in P tags. I want to know based on what parameters the content of

  • Nano problems - unable to update/restore

    I saw a thread on a very similar topic, and I'm rather hoping someone bright like Casper could help me as well! For some reason my Nano was showing the sad iPod icon (I'm guessing this is related to using the Logic3 speakers, as I never had any probl

  • I have an older version of Firefox and it doesn´t function with my internetbank system.

    My bank recommended me to download a later Firefox version, but first I had to uninstall the present, older version to secure an optimal functioning. How do I uninstall the current Firefox from my IMac ??

  • User Exit to change PR valuation price

    Dear SAP Experts, My requirement is to pick up info-record or contract price as valuation price when creating PR (Purchase Requisition) - t-code ME51N. I've been aware that there is no configuration that can be set to accomodate this requirement. The