Submit into ABAP repository failed (binary file)

Hi,
im working with eclipse / sapui5 extension. i really like it. everything works fine.
exceptional case:
                              "try to submit a ".cur" file"
Synchronization failed
File WebContent/img/openhand.cur could not be submitted
End of line marker not supported, please use CR+LF: WebContent/img/openhand.cur
What? "I should add CR-LF to a binary file?" ... why? The CR-LF on textfiles is incomprehensible for me, but on
binary i cannot understand at all.
If anyone has a solution, please let me know.

Hi,
the solution to submit not currently as binary defined files to abap repository is:
define your fileextension in ecplise as "binary" as documented in the sapui5 sdk docs.
SAPUI5 SDK - Demo Kit
"Submitting the SAPUI5 Application Project to the SAPUI5 Repository"
When using the team provider the file type is determined based on the Eclipse preferences.
If you submit binary files and submit fails due to "End of line marker not supported" error,
the binary file type is probably not registered as binary.
To change that in Eclipse go to Window → Preferences and then to Team → File Content and register the binary file type as type binary."
like this...
faithfully... Danilo.

Similar Messages

  • Simple Transformation to deserialize an XML file into ABAP data structures?

    I'm attempting to write my first simple transformation to deserialize
    an XML file into ABAP data structures and I have a few questions.
    My simple transformation contains code like the following
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates"
                  xmlns:pp="http://www.sap.com/abapxml/types/defined" >
    <tt:type name="REPORT" line-type="?">
      <tt:node name="COMPANY_ID" type="C" length="10" />
      <tt:node name="JOB_ID" type="C" length="20" />
      <tt:node name="TYPE_CSV" type="C" length="1" />
      <tt:node name="TYPE_XLS" type="C" length="1" />
      <tt:node name="TYPE_PDF" type="C" length="1" />
      <tt:node name="IS_NEW" type="C" length="1" />
    </tt:type>
    <tt:root name="ROOT2" type="pp:REPORT" />
        <QueryResponse>
        <tt:loop ref="ROOT2" name="line">
          <QueryResponseRow>
            <CompanyID>
              <tt:value ref="$line.COMPANY_ID" />
            </CompanyID>
            <JobID>
              <tt:value ref="$line.JOB_ID" />
            </JobID>
            <ExportTypes>
              <tt:loop>
                <ExportType>
                   I don't know what to do here (see item 3, below)
                </ExportType>
              </tt:loop>
            </ExportTypes>
            <IsNew>
              <tt:value ref="$line.IS_NEW"
              map="val(' ') = xml('false'), val('X') = xml('true')" />
            </IsNew>
          </QueryResponseRow>
          </tt:loop>
        </QueryResponse>
        </tt:loop>
    1. In a DTD, an element can be designated as occurring zero or one
    time, zero or more times, or one or more times. How do I write the
    simple transformation to accommodate these possibilities?
    2. In trying to accommodate the "zero or more times" case, I am trying
    to use the <tt:loop> instruction. It occurs several layers deep in the
    XML hierarchy, but at the top level of the ABAP table. The internal
    table has a structure defined in the ABAP program, not in the data
    dictionary. In the simple transformation, I used <tt:type> and
    <tt:node> to define the structure of the internal table and then
    tried to use <tt:loop ref="ROOT2" name="line"> around the subtree that
    can occur zero or more times. But every variation I try seems to get
    different errors. Can anyone supply a working example of this?
    3. Among the fields in the internal table, I've defined three
    one-character fields named TYPE_CSV, TYPE_XLS, and TYPE_PDF. In the
    XML file, I expect zero to three elements of the form
    <ExportType exporttype='csv' />
    <ExportType exporttype='xls' />
    <ExportType exporttype='pdf' />
    I want to set field TYPE_CSV = 'X' if I find an ExportType element
    with its exporttype attribute set to 'csv'. I want to set field
    TYPE_XLS = 'X' if I find an ExportType element with its exporttype
    attribute set to 'xls'. I want to set field TYPE_PDF = 'X' if I find
    an ExportType element with its exporttype attribute set to 'pdf'. How
    can I do that?
    4. For an element that has a value like
    <ErrorCode>123</ErrorCode>
    in the simple transformation, the sequence
    <ErrorCode>  <tt:value ref="ROOT1.CODE" />  </ErrorCode>
    seems to work just fine.
    I have other situations where the XML reads
    <IsNew value='true' />
    I wanted to write
    <IsNew>
            <tt:value ref="$line.IS_NEW"
            map="val(' ') = xml('false'), val('X') = xml('true')" />
           </IsNew>
    but I'm afraid that the <tt:value> fails to deal with the fact that in
    the XML file the value is being passed as the value of an attribute
    (named "value"), rather than the value of the element itself. How do
    you handle this?

    Try this code below:
    data  l_xml_table2  type table of xml_line with header line.
    W_filename - This is a Path.
      if w_filename(02) = '
        open dataset w_filename for output in binary mode.
        if sy-subrc = 0.
          l_xml_table2[] = l_xml_table[].
          loop at l_xml_table2.
            transfer l_xml_table2 to w_filename.
          endloop.
        endif.
        close dataset w_filename.
      else.
        call method cl_gui_frontend_services=>gui_download
          exporting
            bin_filesize = l_xml_size
            filename     = w_filename
            filetype     = 'BIN'
          changing
            data_tab     = l_xml_table
          exceptions
            others       = 24.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.

  • Import XML file into ABAP WD

    Hi,
    Is there any way to upload an XML file into ABAP WD?
    I just saw a blog for Java WD.
    <a href="/people/johann.marty/blog/2006/10/03/create-a-web-dynpro-tree-from-an-xml-file:///people/johann.marty/blog/2006/10/03/create-a-web-dynpro-tree-from-an-xml-file
    Is there a similar facility in ABAP WD?
    Regards,
    Haresh.

    hey u can do this by using CALL Transformation id.. command..
    here is the example code where i wrote this to convert it DATA to XML format...it may help u..
      DATA : BEGIN OF l_xml_tab OCCURS 0,
              a(100) TYPE c,
             END OF l_xml_tab.
      DATA : xml_out TYPE string .
      DATA : lw_xml_tab LIKE LINE OF l_xml_tab.
    XML
      CALL TRANSFORMATION id "('ID')
      SOURCE tab = gt_outtab[]
      RESULT XML xml_out.
    Convert to TABLE
      CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
        EXPORTING
          i_string         = xml_out
          i_tabline_length = 100
        TABLES
          et_table         = l_xml_tab.
      OPEN DATASET p_lgfil1 FOR OUTPUT IN BINARY MODE.
      LOOP AT l_xml_tab INTO lw_xml_tab.
        TRANSFER lw_xml_tab TO p_lgfil1.
      ENDLOOP.
      CLOSE DATASET p_lgfil1.

  • "Load files into Photoshop layers" fails to complete CS6

    Hi all,
    Hoping someone can help with the folling problem with Photoshop & Bridge CS6
    When in Bridge, after selecting 6 images (CR2) using the command TOOLS>LOAD FILES INTO PHOTOSHOP LAYERS the first file will load into Photoshop, Photoshop will then generate a second blank layer and then read the second file. At this point the "script" will stop. I am left with a document with 2 layers. The top layer has my first image, the bottom layer is empty.
    At this point when I quit Photoshop I am prompted to save this open document which appears to be the only open document. I choose not to save this as a file. I then get a dialogue box prompting to save another open document. Photoshop has loaded the second file to place as a layer but as the "script" has aborted I am left with an open, but invisible file.
    When I first loaded CS6 on Snow Leopard, it would demonstrate this behaviour every time I attempted to run this command from Bridge.
    I did a clean install on a blank HDD of OSX Lion. Installed CS6. The command worked without fail for about a month.
    Then I would get the command aborting occasionally. Restarting Photoshop would let me continue for a few hours before this aborted script problem would happen again.
    Over the last week it has become more frequent, to a point where this workflow is unusable.
    A restart of Photoshop may fix the problem for the next batch of images, only to fail again soon after, or fail on the first attempt after a relaunch of Photoshop.
    A reboot of my computer will allow my to load one or two sets of files before again failing to complete the command.
    I have tried the following:
    In Photoshop preferences:
    disabling the "Use graphics Processor"
    Increasing or decreasing the amount of RAM available to Photoshop
    Changing the cache levels or changing the cache tile size
    changing the scratch disk
    Trashing the Photoshop preferences file (Photoshop Settings.psp)
    In Bridge
    Purging the cache
    Increasing or decreasing the cache size
    Resetting Bridge preferences (holding Command on launch) and deleting all cache files.
    In general system
    Quitting extra programs (Safari, Thunderbird, iTunes)
    Sometimes this will seem to then allow Photoshop to load a full set of images, only to abort again after a few sets.
    Rebooting the computer - again will work for a few images sets before again failing.
    Now the fact that it worked fine for several weeks without presenting a problem would indicate that it is not a bug.
    The fact that is slowly started happening then became more frequent would indicate something changing slowly over time - a larger cache folder perhaps, although purging known Bridge cache folders has not filed the problem.
    Really at the end of my tether here. Even considering downgrading to CS5 - but don't want to have to use the older Adobe Camera Raw.
    System is as follows:
    Mac Pro 2 x 2.66 Quad Core
    24GB RAM
    ATI Radeon HD 4870 512
    OSX Lion 10.7.4
    I have seen a couple of others have posted having a the same problem, both with CS5 and CS6.
    Hoping someone has an answer.
    Thanks.

    Hi JJMack - I just re-read your post. For some reason I thought you were suggesting to make sure "Open documents in Tabs" was selected, it was. Now I realize you were suggesting to turn it off! As another attemp to solve this problem I did de-select it today. Seemed to work for a good while. I was getting very excited, then, on the last set of images I had to do it displayed the same problem. But, it did go for quite a while without failing, and when it did I was thrashing about trying to make another app active. When loading documents like this - with "Open documents in Tabs" de-selected, Photoshop wants to put the loading images as the front-most window, no matter what other apps (Bridge, email, web etc) I click on in the dock. I think it is related to the bug you described effecting the "load files to stack" command.
    Hopefully Adobe is looking at this - mind you, I have read reports of people having this problem in CS5! Looks like that was never resolved sadly.
    I'll keep testing and post back.
    I am looking to upgrade my video card to see if it's a video memory thing.
    What is very weird though is the fact that this problem didn't present itself until after several weeks of working with this command with no problem. No additional apps installed, nothing changed. Why would it start happening only after a while?
    Thanks again for your suggestion.

  • Reading XML files into ABAP

    Hello folks,
    I've been struggling and I need to figure out how to read a field from an XML field into ABAP. I'm writing this method and I need to call this field from my XML file. Can you guys please give me suggestions? Please advise. I will appreciate your time. Thanks in advance.
    Ol.

    *& Report z_xit_xml_check
    report z_xit_xml_check.
    class cl_ixml definition load.
    type-pools: ixml.
    types: begin of t_xml_line,
    data(256) type x,
    end of t_xml_line,
    begin of tsfixml,
    data(1024) type c,
    end of tsfixml.
    data: l_ixml type ref to if_ixml,
    l_streamfactory type ref to if_ixml_stream_factory,
    l_parser type ref to if_ixml_parser,
    l_istream type ref to if_ixml_istream,
    l_document type ref to if_ixml_document,
    l_node type ref to if_ixml_node,
    l_xmldata type string.
    data: l_elem type ref to if_ixml_element,
    l_root_node type ref to if_ixml_node,
    l_next_node type ref to if_ixml_node,
    l_name type string,
    l_iterator type ref to if_ixml_node_iterator.
    data: l_xml_table type table of t_xml_line,
    l_xml_line type t_xml_line,
    l_xml_table_size type i.
    data: l_filename type string.
    parameters: pa_file type char1024 default
    'd:\joao\desenvolvimentos\fi\fact\teste.xml'.
    Validation of XML file: Only DTD included in xml document is supported
    parameters: pa_val type char1 as checkbox.
    start-of-selection.
    Creating the main iXML factory
    l_ixml = cl_ixml=>create( ).
    Creating a stream factory
    l_streamfactory = l_ixml->create_stream_factory( ).
    perform get_xml_table changing l_xml_table_size l_xml_table.
    wrap the table containing the file into a stream
    l_istream = l_streamfactory->create_istream_itable( table =
    l_xml_table
    size =
    l_xml_table_size ).
    Creating a document
    l_document = l_ixml->create_document( ).
    Create a Parser
    l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
    istream = l_istream
    document = l_document ).
    Validate a document
    if pa_val eq 'X'.
    l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
    endif.
    Parse the stream
    if l_parser->parse( ) ne 0.
    if l_parser->num_errors( ) ne 0.
    data: parseerror type ref to if_ixml_parse_error,
    str type string,
    i type i,
    count type i,
    index type i.
    count = l_parser->num_errors( ).
    write: count, ' parse errors have occured:'.
    index = 0.
    while index < count.
    parseerror = l_parser->get_error( index = index ).
    i = parseerror->get_line( ).
    write: 'line: ', i.
    i = parseerror->get_column( ).
    write: 'column: ', i.
    str = parseerror->get_reason( ).
    write: str.
    index = index + 1.
    endwhile.
    endif.
    endif.
    Process the document
    if l_parser->is_dom_generating( ) eq 'X'.
    perform process_dom using l_document.
    endif.
    *& Form get_xml_table
    form get_xml_table changing l_xml_table_size type i
    l_xml_table type standard table.
    Local variable declaration
    data: l_len type i,
    l_len2 type i,
    l_tab type tsfixml,
    l_content type string,
    l_str1 type string,
    c_conv TYPE REF TO cl_abap_conv_in_ce,
    l_itab type table of string.
    l_filename = pa_file.
    upload a file from the client's workstation
    call method cl_gui_frontend_services=>gui_upload
    exporting
    filename = l_filename
    filetype = 'BIN'
    importing
    filelength = l_xml_table_size
    changing
    data_tab = l_xml_table
    exceptions
    others = 19.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    Writing the XML document to the screen
    CLEAR l_str1.
    LOOP AT l_xml_table INTO l_xml_line.
    c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data
    *replacement = space ).
    c_conv->read( IMPORTING data = l_content len = l_len ).
    CONCATENATE l_str1 l_content INTO l_str1.
    ENDLOOP.
    l_str1 = l_str1+0(l_xml_table_size).
    SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
    WRITE: /.
    WRITE: /' XML File'.
    WRITE: /.
    LOOP AT l_itab INTO l_str1.
    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab
    *IN
    l_str1 WITH space.
    WRITE: / l_str1.
    ENDLOOP.
    WRITE: /.
    endform. "get_xml_table
    *& Form process_dom
    form process_dom using document type ref to if_ixml_document.
    data: node type ref to if_ixml_node,
    iterator type ref to if_ixml_node_iterator,
    nodemap type ref to if_ixml_named_node_map,
    attr type ref to if_ixml_node,
    name type string,
    prefix type string,
    value type string,
    indent type i,
    count type i,
    index type i.
    data: name2 type string,
    name_root type string,
    node_parent type ref to if_ixml_node,
    node_root type ref to if_ixml_node,
    num_children type i.
    node ?= document.
    check not node is initial.
    uline.
    write: /.
    write: /' DOM-TREE'.
    write: /.
    if node is initial. exit. endif.
    create a node iterator
    iterator = node->create_iterator( ).
    get current node
    node = iterator->get_next( ).
    loop over all nodes
    while not node is initial.
    indent = node->get_height( ) * 2.
    indent = indent + 20.
    num_children = node->num_children( ).
    case node->get_type( ).
    when if_ixml_node=>co_node_element.
    element node
    name = node->get_name( ).
    nodemap = node->get_attributes( ).
    node_root = node->get_root( ).
    name_root = node_root->get_name( ).
    write: / 'ELEMENT :'.
    write: at indent name color col_positive inverse.
    write: 'NUM_CHILDREN:', num_children.
    write: 'ROOT:', name_root.
    node_parent = node->get_parent( ).
    name2 = node_parent->get_name( ).
    write: 'NAME2: ' , name2.
    if not nodemap is initial.
    attributes
    count = nodemap->get_length( ).
    do count times.
    index = sy-index - 1.
    attr = nodemap->get_item( index ).
    name = attr->get_name( ).
    prefix = attr->get_namespace_prefix( ).
    value = attr->get_value( ).
    write: / 'ATTRIBUTE:'.
    write: at indent name color col_heading inverse, '=',
    value color col_total inverse.
    enddo.
    endif.
    when if_ixml_node=>co_node_text or
    if_ixml_node=>co_node_cdata_section.
    text node
    value = node->get_value( ).
    write: / 'VALUE :'.
    mjprocha
    node_parent = node->get_parent( ).
    write: at indent value color col_group inverse.
    name2 = node_parent->get_name( ).
    write: 'NAME2: ' , name2.
    endcase.
    advance to next node
    node = iterator->get_next( ).
    endwhile.
    endform. "process_dom

  • Convert XML file into ABAP Query

    Hi All,
    Can we capture a XML file generated from a Non-SAP system in SAP system and convert into ABAP Query to retreive Data from DB and post it back as a XML query to the same Non-SAP system using a Middleware. Can this process be done in cache memory level itself instead of saving in DB.
    If it is possible pls do tell the procedure and steps to be followed.
    Suggestion and Help will be much Appreciated
    Thanks & Regds.
    Ramesh

    Hi check these blogs....
    <a href="/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach:///people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
    <a href="/people/tobias.trapp/blog/2005/12/08/xml-processing-in-abap--part-6:///people/tobias.trapp/blog/2005/12/08/xml-processing-in-abap--part-6

  • Want to save the number -9999 into a binary file

    Hello:
    I have this function in which I save different numbers (integers or doubles) into a binary file (with another extension) but when i tried to convert -9999 into bytes and then save it in the file ; it saves -9960 not -9999 as it should. I do not know why.
    This is my function:
    public static void createFile(Double [][] Grid, String txtOutputFile, String[] gridInfoFile){
         Integer[][] intGrid = null ;
         File file = new File(Utils.ChangeFileExt(txtOutputFile, ".myExt"));
         try {
                   FileOutputStream file_out = new FileOutputStream(file);
                   DataOutputStream data_out = new DataOutputStream(file_out);
                   if(gridInfoFile[0].equalsIgnoreCase("1") || gridInfoFile[0].equalsIgnoreCase("1.0")){
                        intGrid = doubleToIntArray(Grid);
              for(int i = 0; i < Grid.length; i++){
                   for(int j = 0; j < Grid[0].length; j++){
                        if(gridInfoFile[0].equalsIgnoreCase("1") || gridInfoFile[0].equalsIgnoreCase("1.0")){
                             Byte byte1, byte2;                         
                             byte1 = new Integer (intGrid[i][j] / 256).byteValue();
                             byte2 = new Integer(intGrid[i][j] - (intGrid[i][j] / 256)).byteValue();
                             data_out.write(byte2);
                             data_out.write(byte1);
                        if(gridInfoFile[0].equalsIgnoreCase("2") || gridInfoFile[0].equalsIgnoreCase("2.0")){
                             ByteArrayOutputStream byte_out = new ByteArrayOutputStream ();
                             DataOutputStream data_out2 = new DataOutputStream (byte_out);
                             data_out2.writeFloat(Grid[i][j].floatValue());
                             byte[] bArray = byte_out.toByteArray();
                             data_out.write(bArray[3]);
                             data_out.write(bArray[2]);
                             data_out.write(bArray[1]);
                             data_out.write(bArray[0]);
              }//fin for
              data_out.close();
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
    I had already tried data_out.writeFloat, write, writeInt, etc without any success.
    If someone knows the answer , please let me know, will appreciate that. Thank you for your help
    magnasound

    Since you are using DataOutputStream, why not use some of its more helpful methods, like writeInt?

  • Import binary file in cvs repository through java cvs import command

    hi ,
    I am using netbean api for cvs command.I am having the same problem that i am not able to open binary file after importing in cvs repository.
    I want to import a directory which contain both text and binary file.
    can you please hel me out to how to import a directory which contain binary files.
    MY CODES
    ImportCommand command = new ImportCommand();
    command.setModule(module);
    command.setLogMessage(comment);
    command.setReleaseTag(releaseTag);
    command.setImportDirectory(path);
    client.setLocalPath(path);
    command.setVendorTag(vendorTag);
    Regards
    ruchira

    Please don't cross post
    http://forum.java.sun.com/thread.jspa?messageID=9455793

  • Binary file content check fails!

    Hello,
    I am finding it hard to capture the content of a binary file.
    Here is my code:
      if(!(null == myInstance.getBin_File().toString()) 
                              && !(myInstance.getBin_File().toString().equals(""))){ 
         //    Do something 
        }else{ 
        // Do something else. 
        }  When the binary file is blank, control still goes into "if" instead of "else"!!!!
    How should I change the "if" condition so that, whenever the binary file is blank, I wanna execute "else"
    Thanks
    Srinivas

    The purpose of toString() is (supposed to be) to return a string identification of the object. That doesn't necessarily mean the contents of the object; in fact, it normally wouldn't. For example, suppose an object holds a 100,000-word dictionary. It's toString() response could appropriately be "[100,000-word widget dictionary]", and not every word in the dictionary.
    So, if you're checking to see if the "xstring", whatever that is, is empty, then using toString() is almost certainly not the way to go, and only would be if "xstring" is really poorly designed and you shouldn't use it anyway.

  • Urgent - pls help - Problem while inserting binary file into Oracle DB

    Hi,
    I am trying to insert binary files into a Blob column in a Oracle 10G table.
    The binary files would be uploaded by the web users and hence come as multipart request. I use apache commons upload streaming API to handle it. Finally i am getting a input stream of the uploaded file.
    The JDBC code is
    PreparedStatement ps=conn.prepareStatement("insert into bincontent_table values(?)");
    ps.setBinaryStream(1,inStream,length);
    My problem starts when i try to find the length of the stream. available() method of inputstream does not return the full length of the stream. so i put a loop to read thru the stream and find the length as shown below
    int length=0;
    while((v=inStream.read())!=-1)
    length++;
    Now, though i got the length, my stream pointer has reached the end and i cant reset it(it throws an error if i try).
    So i copied the stream content to a byte array and created an ByteArrayInputStream like this.
    tempByteArray=new byte[length];
    stream.read(tempByteArray,0,length);
    ByteArrayInputStream bais=new ByteArrayInputStream(tempByteArray);
    Now if i pass this bytearray input stream instead of the normal input stream to the prepared statement's setBinaryStream() method it throws an error as
    "ORA-01460: unimplemented or unreasonable conversion requested".
    Now how to solve this?
    My doubts are ,
    1) preparedStatement.setBinaryStream(int parameterIndex, InputStream x, int length) expects an inputstream and its length. if i have the stream how to find its length with out reading the stream?
    2) Also as the length parameter is a integer, what if i have a large binary file whose length runs more than the capacity of integer
    3) Alternatively there is a setBlob(int i, Blob x) in prepared statement. But how to instantiate a Blob object and set it here
    4) Is there any better way to do this.
    Thanks in advance

    "ORA-01460: unimplemented or unreasonable conversion
    requested".When the setBinaryStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARBINARY or a BLOB (reference: javadoc)
    1) preparedStatement.setBinaryStream(int parameterIndex,
    InputStream x, int length) expects an inputstream and its length. if i
    have the stream how to find its length with out reading the stream?no. stream may have no specified length. i think you have wrong understanding about stream.
    2) Also as the length parameter is a integer, what if i have a large
    binary file whose length runs more than the capacity of integer
    3) Alternatively there is a setBlob(int i, Blob x) in prepared statement.
    But how to instantiate a Blob object and set it here
    4) Is there any better way to do this.use ps.setBlob(1, instream) instead

  • Write string (7 chars), int16, sgl into binary file and read it in C

    How to write write string (7 chars), int16, sgl, string (5 chars) into binary file and then read it in C ?
    Total 18 Bytes file (binary) should be created.

    Hi,
    this could be done that way:
    You have to make sure the strings have their correct length!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to read binary file into a 2D float array??

    Hi All,
    I really need help to get this one as I am stuck and can't seem to find any way out of it. I am given a '.dat' file that has float values in it. I want to read this file in java and put it in a 2D float array. The file has basically a matrix of float values. What I want to do is to read this binary file and put all its data into 2D float array (float [] []) so that I can use it in my program. Is there a way to read file like this? I did find a similar matlab code (below) but cant seem to find anything in java and i really want to do this in java only.. I will appreciate ur help in this one.
    thanks very much
    Nitya
    fid = fopen('datafile.dat');
    A = fread(fid,[50 50],'float32');
    fclose(fid);

    I shud have shown the two ways that i Already tried. here they are..
    first one using DataInputStream and then trying to readFloat()
    DataInputStream dis = ....
    Float f = dis.readFloat();This code gives code gives me some random values like this.. (i had a loop)
    5.8758974E-14
    -0.41055492
    1.5724557E-30
    1.06822824E14
    -1.91934371E15
    3.43829601E13
    Other way i tried was this.. which seems right but here i have to convert byte to float and i thnk that code is giving some different results (slightly different float values) not sure why....may be my indexing of the array is wrong to make it a matrix.. or something else...
    is.read(bytes, offset....);
    int cnt = 0;
    int j = 0;
    for (int start = 0; start < offset; start = start + 4) {
      if(j<50){
           myarray[cnt][j] = this.arr2float(bytes, start);
             System.out.println(cnt + "-" + j + " = " + myarray[cnt][j]);
           j++;
    }else{
      if(cnt < 50){
           cnt++;
           j = 0;
      }else{
           break;
    public float arr2float (byte[] arr, int start) {
              int i = 0;
              int len = 4;
              int cnt = 0;
              byte[] tmp = new byte[len];
              for (i = start; i < (start + len); i++) {
                   tmp[cnt] = arr;
                   cnt++;
              int accum = 0;
              i = 0;
              for ( int shiftBy = 0; shiftBy < 32; shiftBy += 8 ) {
                   accum |= ( (long)( tmp[i] & 0xff ) ) << shiftBy;
                   i++;
              return Float.intBitsToFloat(accum);
    Not sure if i am missing some other way to do this...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How do i import labview binary file into diadem

    hi,
    i am acquiring an analog input, and writing the data into a binary file. how do i access the data?
    can i import the file into Diadem? if so how?
    thanks
    jithendra

    Hi jithendra,
    Well, that IS a simple binary structure.  I didn't have all the scope VIs on my computer, so I couldn't tell-- do your binary data files always have a fixed number of channels (2, perhaps)?  If so, it would be absolutely trivial to create a DataPlugin for you, and I would be happy to do so.  Do you save your binary data files with a consistent file extension (*.bin or something)?  Then DIAdem could automatically associate that file "type" with the DataPlugin, and you could simply drag and drop your binary files into DIAdem.
    Alternatively, the TDM Header Writer VIs would also be pretty easy to use to create TDM header files for your binary files-- just make sure you set the byte order property to Big-Endian, as in the examples in that AppNote.
    Either approach ought to work fine,
    Brad Turpin
    Product Support Engineer
    National Instruments

  • BIOS binary file open failed

    '¶},eê'F„‰½,à:http://www.microstar.com.cn„º[òÏsí†,
    ê}eÙÌB©†.
    „ñí4s
    *}(¡žÕôZ„;ú°„î˜)
    Ø÷'¶Á,_÷ ~„5ØKY
    Ž2003t5ý-p„®K7N2-L;,Söå;
     :K7N2-L,
    F/dž$*,å;
     b:K7N2-Detal-L,wSŸà
    „5„Mn‚:
    AthlonXP1800+( BO8Ã)
    DDR 333 256MB
    w6ã80GlØ
    ®K7N2-Detal-L
    ®GF4 MX440SE
    °(„;BIOSH,6/5.0H,, à:¡   Mnoq,_¡   UØ
    ,@åê}(®„live monitor(windowsXP7°BIOS,}†°„BIOS(5.6H,)
    K,‰Åöú°‚Ð:"BIOS binary file open failed",
    åS/ÀHŸà,
    ÷îå‚Uã³?

    im guessing based on
    BIOS binary file open failed
    http://www.msi.com.tw/html/support/bios/note/ntfs.htm

  • Basic Binary File Does not Read Unless Placed into Exact Format it originated?

    Ok, check this out.  This just does not make any sense to me.  First, you'll need to run it and create the two files.  You're going to get an error at the close.  Now...here's what doesn't make any sense to me.  If you enable the disabled diagram and read that same file, you can look at how the file is being read and the data interpreted.  How is that any different and not causing an error?  I took the U8 and changed it back to its original Boolean Array[8] format and received no error.  Which means the data was read as a U8 at some point.  But...for whatever reason, cannot be read and displayed as a U8.  What's up with that?  What am I not understanding?
    Remember, code does exactly what you tell it.
    Solved!
    Go to Solution.
    Attachments:
    Binary File Issue.vi ‏23 KB

    DailyDose wrote:
    Huh....no read and write.  Either read or write.  Gotcha.
    Not quite.  It is a matter of where the file pointer is.
    The file pointer is what location in the file will be read from or written to, depending on what you do next.  When you write to a file, the file pointer is set to be directly after what you just wrote.  So when you write a new file, the file pointer is at the end of the file.  So when you try to do a read when the file pointer is at the end of the file, an attempt of a read at the end of the file happens.  But there is nothing left for it to read.  Therefore you get an End Of File error.
    So if you just added a Set File Position to set the file pointer to the start of the file, you can read your byte with no error.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Binary File Issue_BD.png ‏25 KB

Maybe you are looking for