How to determine the length of a LRAW field

Hi
I'm trying to write a generic persistency class that saves data in a table with a lraw field.
As required the lraw field must be preceded by a length field of type INT2, but how can I calculate the actual length of the lraw field?
kind regards Thomas

Hi Martin
I'm sorry to tell you that you are wrong. The INT2 field must contain the actual length.
I have a table with a LRAW of 1024 bytes, but if I put 15 to the length field, then only 15 bytes are stored in the database.
Of course I could just enter 1024 for the length, but that would wast a lot of database space - and performance.
My class has a persistency method that inserts or updates a record in the database. The data that should be stored in the LRAW is sent to the method via a pointer (field symbol) of type X. This pointer can point at any data type.
Something like this:
field-symbols: <input> type x.
field-symbols: <lraw> type x.
*assign any field to <input>
assign <lraw> to mydbtable-lraw_field casting.
<lraw> = <input>.
*here i need to determine the length of mydbtable-lraw_field before i store the content to the database.
By debugging I can tell that if the pointer points to a char 32 field then the length of the X pointer is 64 and if the pointer points to a timestamp then the length of the x pointer is 8, but how can I determine this length programmatically - either from the x pointer or from the LRAW?
Best regards
Thomas

Similar Messages

  • How to determine the length of a curved path in illustrator CS2

    how to determine the length of a curved path in illustrator CS2?

    bornfree,
    The free Patharea/Pathlength Filters from Telegraphics is your friend (the former gives you both area and length, both in different units):
    Telegraphics - Free plugins for Photoshop & Illustrator...and other software

  • How to determine the length of variable based on the character contents

    Hi Experts,
    I need to determine the length of variable based on the character contents I am looking for.
    Example;
        lv = 'FENCE - Construction bond'
    Where I need to know the exact field length of 'FENCE -'.
    It's possible that variable will have different values in different lengths.
    Thanks.
    Kath

    Kathy Amion  ,
    hello Will you please elaborate ...!
    The suggestion for your proble as i understood it is you will have to split the string at seperator '-' in two say variable name and conten. and then  you will calculate the length of the VARIable name by using string function.

  • How to determine the length of a line of text in a multi line text control

    I am working on a simple widget to compare two snippets of text.  The string controls are side by side with a colum of square bools in between
    the two string controls.
    The Bools line up with the lines of text in each string control.  The Bools are used as a quick indicator that at that line point there is a difference
    between the two string controls.
     There is a slider that allows the user to scroll up and down,  the slider scrolls both string controls simutaneously.
    As the string controls are scrolled I will be comparing the left and right lines of text and reflecting the match status in the Bool Colum.
    The reason I need to know the length of the line of text is so each line can be compared against one another.  It is not as simple as counting the
    col width of the string control and parsing the text because if there is a line return the text will word wrap before before it extends all the way accross the string control, which will cause parsing discrepencies.
    Any suggestions on obtaining the multi line string control text character length would be much appreciated.
    Best Regards
    Tim C. 
    1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!

    Front panel of widget....
    1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
    Attachments:
    One.vi ‏27 KB

  • How to determine the types of interactive form fields

    Hello:
    I have written a utility that traverses through the objects in a PDF file, and finds the ones of Type "Annot", Subtype "Widget". I need to go one step down the hierarchy and determine which kind of widget (text, radio button, check mark, press button) is the one under scrutiny.
    I have looked at the innards of PDF files, and found that the widgets of type "text" are internally identified by the FT=Tx dictionary entry. So far, so good.
    Here is where the beauty and consistency stops. It turns out that all the other (non-text) types are ambiguously identified by FT=Btn dictionary entry.
    So: Every field which is not text, is a button.
    Where should I look?
    TIA,
    -RFH

    Digging a little deeper, I found that the 4 types of fields (as generated by default) have different keys, as follows:
    Text: [F, FT, MK, P, Rect, Subtype, T, Type]
    Check Box: [AP, AS, F, FT, MK, P, Rect, Subtype, T, Type]
    Radio Button: [AP, AS, BS, F, FT, Ff, MK, P, Rect, Subtype, T, Type]
    Button: [AP, DA, F, FT, Ff, MK, P, Rect, Subtype, T, Type]
    Is that the correct approach to determine the kind of fields, by querying for the keys, which somehow instantiate a fingerprint?
    TIA,
    -RFH

  • How do I determine the length of a column?

    Does anyone know how to determine the length of an Oracle column through sql statements? I know in SQL Server you can use the COL_LENGTH function to find the maximum length for a particular column, but I haven't been able to find an equivalent for Oracle.
    We have a column in a database that is a VARCHAR2 and can be any szie from 64 to 255 characters. I need to determine on the fly from a running client application what size the column is in the current database.
    Thank you very much for any help you can give me.

    select data_length from user_tab_columns
    where table_name='YOUR_TABLE' and column_name='YOUR_COLUMN';
    if you want function to return this value, create function like below..
    create or replace function col_len(t varchar2,c varchar2)
    return number is
    n number;
    begin
    select data_length into n from user_tab_columns
    where table_name=upper(t) and column_name=upper(c);
    return n;
    exception
    when others then
    return 0;
    end;
    /

  • How to determine the maximum allowable length of a filename for Window ?

    Hi all,
    Could I know how to determine the allowable file length (the length of the absolute path) for a file in Window environment?
    Due to some reason, I generated a zip file with a very long filename ( > 170) and put in a folder(the length of the folder path around 90). The length of the absolute path is around 260.
    I used FileOutputStream with the ZipOutputStream to write out the zip file. Everything is working fine while i generating the zip file.
    However, while i try to extract some files from the zip file i just created, i encountered the error
    java.util.zip.ZipException The filename is too long.
    I am using the class ZipFile to extract the files from the zip file like the following
    String absPath = "A very long filepath which exceed 260";
    ZipFile zipF = new ZipFile(absPath);  //<-- here is the root causeIs it possible to pre-determine the maximum allowable filepath length prior i generate the zip file ? This is weird since i got no error while i created the zip file, but have problem in extracting the zip file ......
    Thanks

    Assuming you could determine the max, what would you do about it? I'd say you should just assume it will be successful, but accommodate (handle) the possible exception gracefully. Either way you're going to have to handle it as an "exception", whether you "catch" an actual "Exception" object and deal with that, or manually deal with the length exceeding the max.

  • How to determine the number of rows of data in a datatable?

    I have a datatable that I fill from an SQL query.  I do not know exactly how many rows of data it will return (due to my selection criteria) but will be somewhere between 100 and 300 rows.  I send this data into a report but need to determine the length of the report (panel height data member) programatically based on how much data the query has returned.  So, I need a way to count how many rows are filled in the data table.
    I tried doing a nested "if" statement checking the value of each cell but when I tested the expression at 59 "if" statements (will need 300+) I got a parser error in lookout when I tried to accept the connection.  I also tried a type of loop by assigning cursor.2 either to its own value (circular) or to its own value plus one depending on the value of the cell at cursor.2.  It was close but overshot by one row or more (much more sometimes).
    Any clever ideas?  Perhaps I have just been looking at this problem too long.  Thanks, in advance, for your help.

    Since the datatable gets the data from the SQL query, you can also use the SQL statement to count the number of rows in the query result.  
    For example, in datatable you do "select localtime, trace1 from intdata where xxx". You can get the count by "select count(trace1) from intdata where xxx". Use the same condition in order to get the same number of rows.
    Maybe another SQLExec object is needed to do the count.
    Whenever the datatable executes the SQL, the SQLExec executes and return the count.
    Ryan Shi
    National Instruments

  • How can determine the duration of an audio file

    Hi,
    i'm making speech recognition project using java. i can capture sound by michrophone and playback it. the type of the sound is .wav.
    my question is how to determine the recording duration (for example: determine the duration for 0.25 second) because i must recorded syllable,the assumtion is needed less than 0.5 second to say a word. and then.. can this wav file be changed into... binary or integer ?
    thanks for your help

    FYI I'm newbie in Java,
    Yes, I want to limit the audio file lengths to a certain value. What should I do?
    I have read wav file using an AudioInputStream, for audio format I'm using sampleRate = 8000.0F and sampleSizeInBits = 8. My friend said if I used 8 bit for sampleSizeInBit (resolution in amplitude) the binary file should be -128 till 127 in range according to the bit. I try this code and the result is binary file which is zero, positive, and negative.
    the code
    try{
    audioInputStream.read(audioBytes);
    for (int i=0; i<audioBytes.length;i++){
    System.out.println(audioBytes);
    catch(IOException ioe){
    System.out.println("Error"+ioe);
    I'm not sure that the code is right, but it works. Should I change the audioBytes into integer before? I try this code but it doesn't work.
    int a = new int[audioBytes.length];
    for (int i=0;i<audioBytes.length;i++){
    a[i] = new Byte(audioBytes[i]).intValue();
    this binary file has been printed in console (I’m using texpad). So, how I can write that to file.txt? I'm using FileoutputStream but it doesn't work correctly. Here is the code
    FileOutputStream fos = new FileOutputStream(strFilePath);
    {audioInputStream.read(audioBytes);
    fos.write(audioBytes);
    catch (IOException ioe){
    System.out.println("Error"+ioe);
    When I open file .txt is read as character like this üüüüüüüüüüüüûüüüûüûûû ||||||| ||||||| ||||||||||||||||||||||||||||| &#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746; (like using alt plus number)
    Edited by: anasfr on Mar 19, 2009 9:02 AM

  • How to determine column length semantics through ANSI Dynamic SQL ?

    I am looking for a way to determine the length semantics used for a column through ANSI Dynamic SQL.
    I have a database with NLS_CHARACTERSET=AL32UTF8.
    In this database I have the following table:
    T1(C1 varchar2(10 char), C2 varchar2(40 byte))
    When I describe this table in SQL*Plus, I get:
    C1 VARCHAR2(10 CHAR)
    C2 VARCHAR2(40)
    In my Pro*C program (mode=ansi), I get the select statement on input, use PREPARE method to prepare it and then use the GET DESCRIPTOR method to obtain colum information for output:
    GET DESCRIPTOR 'output_descriptor' VALUE :col_num
    :name = NAME, :type = TYPE,
    :length = LENGTH, :octet_length = OCTET_LENGTH
    For both C1 and C2 I get the following:
    :type=12
    :length=40
    :octet_length=40
    So, even if I know that my database is AL32UTF8, there doesn't seem to be a way for me to determine whether char or byte length semantics were used in C1 and C2 column definitions.
    Does anybody know how I can obtain this information through ANSI Dynamic SQL?
    Note: the use of system views such as ALL_TAB_COLUMNS is not an option, since we wish to obtain this information even for columns in a complex select statements which may involve multiple tables.
    Note: I believe OCI provides the information that we need through OCI_ATTR_DATA_SIZE (which is in bytes) and OCI_ATTR_CHAR_SIZE (which is in chars). However, switching to OCI is something we would like to avoid at this point.

    Yes, I was wondering which forum would be the best for my question. I see similar questions in various forums, Call Interface, SQL and PL/SQL and Database - General. Unfortunately there is no Pro*C or Dynamic SQL forum which would be my first choice for posting this question.
    Anyway I now posted the same question (same subject) in the Call Interface forum, so hopefully I'll get some answers there.
    Thank you for the suggestion.

  • How to Find the length of Infosource?/

    Hi BW Guru's,
    How to Find the length of Infosource?
    Thanks
    Bhima Chandra Sekhar G

    Hi Bhima,
    You can look up the transfer structure (extract structure) in table ROOSOURCE in the active version of the DataSource and determine its size via SE11 (DDIC) -> Utilities -> Runtime object -> Table length.
    Hope it helps!
    Bye,
    ROberto

  • How to get the length in bytes of a string

    My string has both latin (1 byte) and chinese (2 bytes).
    My program is in unicode system.
    How to measure the length in bytes of the string?
    the xlen function does not work.

    Hello,
    parameters : p_str type string.
    data : len type i.
    len = strlen( p_str ).
    write : / len.
    With Regards,
    BVS
    Hi BSV, your code return the number of characters not bytes.
    Remember chinese character in US are encoded with 2 bytes.
    And my string contain both latin and chinese characters.
    thanks

  • How to determine the ROWNUM in a Master Detail Form

    Hello,
    I am working in a Master Detail Form with Orders and Order Items Information; and I created a process that allows the users to select a Product ID on a tabular form, and the next column is populated automatically with the Product Description.
    To achieve that, I followed some instructions by Denes Kubicek (http://apex.oracle.com/pls/otn/f?p=31517:241), but my case is slightly different:
    <ul>I am using a wizard-created tabular form, instead of a manual tabular form; and </ul>
    <ul>Instead of using another page as a Popup to pass the parameter of the ROWNUM, I am using a plug-in called “Tabular Form Super LOV” which is a modified version of the SkillBuilders’ Super LOV that works on Tabular Forms. </ul>
    The Product ID is returned in the correct row by the plug-in; but in the case of the Product Description, it is always returned into the first row; and my problem is that I don't know how to determine the row where the user clicked to call the plug-in.
    I set up an example in apex.oracle.com in case someone would like to look at it:
    Workspace: ediazjorge
    Username: test
    Password: test
    App Name: Sample App
    App Number: 1550
    BTW, I am using Apex 4.1.1.00.23 and Oracle DB 10.3.2.
    Thanks in advance,
    Erick

    Hello VC,
    Thank you for your time and help.
    Unfortunately, it is still not working properly:
    1. When the Popup LOV opens, the first row of the tabular form is 0, the second row is 1, and so on. How can I assign the values starting with 1 and in the format *0001* ? (I am still a novice on Apex and new to JavaScript :-), sorry about that).
    --2. Also, when I close the Popup LOV, the value of P1_ROWNUM is ‘undefined’ again so I'm not sure if the Product Name column will be populated.--
    3. And finally, you are using the jQuery Selector uPopupLOVIcon, which is an attribute of the Cloudy Theme. In my real application (Apex 4.1.1.00.26), my element looks like: *<img src="/i/lov_16x16.gif" width="16" height="16" alt="Popup Lov" alt="List" style="vertical-align:middle;" align="middle" />*. What do you recommend me to use as a jQuery Selector?
    Again, I really appreciate your help and time. I think you solved the most difficult part.
    Thank you so much,
    Erick
    Update: I just found out that the problem with my comment 2 is because I didn’t delete the previous dynamic action that set the value to P1_ROWNUM.
    Edited by: ediazjorge on Sep 18, 2012 11:20 AM

  • How to determine the mount point for directory /tmp ?

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
    http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    I am installing Grid infrastructure. I am on step 7 of 10 (verify Grid installation enviroment) and get this error:
    "Free Space: Rac2: /tmp"
    Cause: Could not determine mount point for location specified.
    Action: Ensure location specified is available.
    Expected value: n/a
    Actual value: n/a
    I have checked the free space using the command:
    [root@Rac2 /]# df -k /tmp
    Output:
    Filesystem     1k-blocks     used     Available     Use%     Mounted on
    /dev/sda1     30470144     7826952     21070432     28%     /
    As you see above, the free space is enough, but could not determine mount point for /tmp.
    Do any folk understand how to determine the mount point for directory /tmp ?
    Thanks.

    I have just checked "/home/oracle/.bash_profile". But in my computer, there is no "oracle" under /home directory.Is this your first time Linux and Oracle installation? I had a brief look at your referenced link. The reason why you do not find a "oracle" user is because the instructions use "ora11g" instead, which, btw, is not standard. The directories of your installation and your installation source can be somewhat different from known standards and you will have to adjust it to your system.
    My best guess is that you have either missed something in the instructions or you need to ask the author of the blog what is wrong. The chance to find someone here who has experience with these custom instructions is probably unlikely.
    I suggest you try to locate the cluster verification tool, which should be in the bin directory of your grid installation. Alternatively you might want to check the RAC, ASM & Clusterware Installation forum: RAC, ASM & Clusterware Installation

  • How to determine the field size

    I am going to make a multiplatform application that hopefully
    will run on linux and windows 2000.If the os is 2000, then I will use
    vb.net/aspx else I'll use java servlets. I make the connection
    to the web server ( through HTTP) not directly to database server.
    So, the resultset will be stored in the String object. The columns
    will be separated by delimeter. Our problem is how to determine
    the size and type of the fields of mssql,oracle and postgres database
    so that we can include it in the String object.
    Ex.
    String sResultSet=new String();
    ResultSet rs=statement.executeQuery(sSQL);
    while(rs.next()){
    sResultset=sResultSet + rs.getString(field1) + "||" + rs.getString(field2) + "||";
    vertical bars acts as delimeter
    supposedly this is the code:
    sResultset=sResultSet + rs.getString(field1) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||" + rs.getString(field2) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||";
    supposedly this is the code if rs.getFieldType() and rs.getFieldSize() methods are existing
    Anyone can give me an idea how to get the field type and field size of the database?
    thanks in advance

    Yes, but I dont know how to do it.
    Can you give me an example of using it.
    Thanks in advance

Maybe you are looking for

  • Ease of embedding video in iWeb 09?

    i have iWeb 06. i have never been successful at embedding video from youtube or vimeo. is there an easy way to do this in iWeb 09?

  • Changes in objects from diff releases

    Hi ABAPers,   I wish to know, how can i find which particular function module has been changed in a current release. Is there any table or function module which gives us information as which particular SAP object has undergone change. Thanks, Sonu.

  • Validating XML with XMLType.CreateXML and a schema

    I created a schema with: dbms_xmlschema.registerSchema('com/company/user/project/forexample.xsd', xsd_as_clob); This works fine and I can see the elements of my schema in the enterprise manager. However when I try to use this schema with: xmltype_var

  • Edge tools and normal Creative suite

    Hi guys, i dont know if this is in the right section but i have a question that i am struggling to find the answer for. I really like the idea of all these edge tools, however how do they all link up, for instance say that i want to create a responsi

  • JspDynPage debugging

    I am not able to debug JspDynPage components. Control never stops at a breakpoint. Debugging DynPage and AbstractPortalComponents was fine. But have problem with only JspDynPage components. Do I need to do any additional setting in the debug configur