Text field salve in database (BLOB? )

I'd like that a field (in forms) could hold a text whith format (italic, underline,...).
And this field can be safe in database oracle. I've searching and I found the type LOB.
Could I use the field like a BLOB?? How can I link this field and the database?
Thanks in advance..
     Sueli
[email protected]

You can store the file in a blob (it's just binary data) but you won't be able to display it in forms. If you're talking about a word document, you could use ole to invoke word.
blob fields, in forms, are of type IMAGE (the only type that can be displayed on the canvas). Define your forms field as IMAGE, just make sure you don't map the field to a canvas.
Regards,
Bert

Similar Messages

  • Link dropdown choice to multiple text fields from access database

    Is there anyway to link the choice of a dropdown field so it populates other text fields?
    Example:
    I have created a Data Connection from a MS Access Database for a drop down list which is CompanyName.  When I choose the company name I would like it to populate First Name, Last Name, Email, Adress, etc.  Does this require a significant amount of code to do...and if so does anyone have a good book suggestion to learn the code for something like this?
    Any help in solving this problem is greatly appreciate.  I have searched everywhere and found no conclusive answer.  Or maybe I am just searching in the wrong place?  Thanks for your help.

    You will have to make another data connection and create a SQL call to the DB that will incorporate the selection made in the DDList. This will involve code. There is a sample wriiten by Stefan Cameron at this location:
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    Paul

  • How can I Insert a Text field in a DATABASE TABLE???

    Hello at all,
    i have a database Table ZTEST with 2 columns.
    MANDT     TYPE     CLNT
    TEXT         TYPE     char     (255)
    In my internal table tab, i have a text content. I want insert this content in my database table ZTEST.
    DATA: tab TYPE TABLE OF ZTEST,
               lin TYPE ZTEST.
    lin-text = 'HELLO WORLD'
    APPEND lin TO tab.
    INSERT INTO ZTEST VALUES tab.
    Commit Work.
    Is this correct???? BECAUSE it doesnt work.
    Edited by: ETN_58 on Mar 31, 2010 10:27 AM

    Hi All,
    Here table ZTEST has two fields kunnr and text where kunnr is the key field.
            REPORT  ZATEST                                  .
           tables ztest.
          DATA: itab TYPE TABLE OF ZTEST with header line.
            itab-kunnr = '67890'.
            itab-text = 'HELLO WORLD'.
            APPEND itab.
           if sy-subrc eq 0.
               INSERT  ZTEST from table itab.
            Commit Work.
          endif.
           Check with this, its working fine.
                 Regards,
                Md Ziauddin.

  • Populating multiple text fields from a database table...

    I have a database table with several fields e.g. drawing_no, title, date_entered etc..I have a form that has the same fields. I want to be able to input a value into drawing_no field, and have it retrieve all the other values from the database - if they exist, or return blanks/nulls if it does not exit. I know how to do this for a single field, but not for retrieving multiple fields

    Hi ,
    You can create a before header page process and fetch all the fields from database, or you can take a look at in-built process Automated Row Fetch.
    For e.g. lets say u have field1, field2, field3, field4 and field5 based on col1, col2, col3, col4, col5 from table tab1
    Now create a page process of type PL-SQL and give a meaningful name to the process and accept the default as on Load Before header. In the "Enter PL/SQL Page Process" block enter a code similar to this one
    DECLARE
    BEGIN
    IF :drawing_no IS NOT NULL THEN
      SELECT col1, col2, col3, col4, col5 INTO :field1, :field2, :field3, :field4, :field5
      FROM tab1 WHERE drawing_no = :drawing_no ;
    END IF;
    EXCEPTION WHEN NO_DATA_FOUND THEN
               NULL;
    END;The above block will fetch the records into input fields every time u refresh the page.
    Hope this helps.
    Thanks,
    Manish

  • Searching text field

    Hello everyone, I have a search box and I would like to
    search through a text field in my database. I have been researching
    on the best way to do this but not too much luck. I am not the
    admin of the server holding my site but I can always ask to see if
    they have functions that you guys recommend. I use a mysql database
    and I have the search working but it only pulls up records that
    match the keyword that I have entered. If the user types in pop and
    goodpop is in the database nothing comes up. The keyword field in
    my data base is populated by the user through a from and it will
    consist of many key words.
    I hope this awesome forum can help me out.
    JN

    when using LIKE you do not need to do the analysis more than
    once ... you are doing the same comparison 3 times in the code you
    posted.
    all you need is :
    Where CustKeyWords LIKE '%#form.crud#%'
    however, if you actually use a phrase like "pop of can" and
    expect to find "can of pop" that will not work because LIKE looks
    for the existance of the word or phrase in any row of data for that
    field.
    i.e. "pop" will result in finding any record with "pop" in it
    ... "can of pop", "pop can", "lollipop", "popsicle", etc.
    however the phrase "pop of can" has no relavent bearing to
    "can of pop"
    If you want to find records that contain ANY of the owrds
    entered, and not just the exact phrase, then you will have to
    divide the phrase up into individual words and that is when you
    will need the OR function to search for multiple match potentials
    in the case of "pop of can" you would divide that into :
    crud1 = "pop"
    crud2 = "of"
    crud3 = "can"
    then your code would be something like
    Where CustKeyWords LIKE '%#form.crud1#%' or CustKeyWords LIKE
    '%#form.crud2#%' or CustKeyWords LIKE %'#form.crud3#%'
    This is just a concept and would need to be tweaked to allow
    for any combination of words, since you wouldn't necessarily always
    have 3 words on a phrase and wouldn't necessarily have a phrase at
    all ... just a word.
    An array or list would likely work best for this.
    It is always usually a good idea to remove common words from
    phrases as well (i.e. "of" , "and" , "the", etc) because otherwise
    you could end up with pretty much every entry from your database.

  • Downloading a file from Database [Blob field]

    I am trying to write an application which can upload and download files [Excel, Word etc.] to/from an Oracle 9i database Blob field. I am using Java/JSP for the same.
    The upload part works just fine. However, when I try to download the file that I uploaded, I get an error.
    A dialog box comes up asking me to Open/Save the file. However, when I try to save it, it says
    �Internet Explorer cannot download �..tion=download&planId= testplan from localhost
    Internet Explorer was not able to open this Internet Site. The requested site is either unavailable or cannot be found. Please try again later.�
    I am using IE 6.0. I tested the same with Firefox browser and was able to download the file.
    Can anyone help?
    Code:
    Following is the code I am using for the same.
    /* Code to retrieve from Blob field */
    String sqlString = "SELECT PLAN_DOCUMENT_NAME,PLAN_DOCUMENT FROM BRS_PLAN_DESCRIPTION WHERE PLAN_ID = ?";
    ps = con.prepareStatement(sqlString);
    ps.setString (1,planId);
    rs = ps.executeQuery();
    while (rs.next()) {
         fileBytes = rs.getBytes("PLAN_DOCUMENT");
         fileName = rs.getString("PLAN_DOCUMENT_NAME");
    brsPlanDocument.setPlanId(planId);
    brsPlanDocument.setFileName(fileName);
    brsPlanDocument.setFileBytes(fileBytes);
    /* Code for download */
    String fileName = brsPlanDocument.getFileName();
    String fileType = fileName.substring(fileName.indexOf(".")+1,fileName.length());
    if (fileType.trim().equalsIgnoreCase("txt"))
         response.setContentType( "text/plain" );
    else if (fileType.trim().equalsIgnoreCase("doc"))
         response.setContentType( "application/msword" );
    else if (fileType.trim().equalsIgnoreCase("xls"))
         response.setContentType( "application/vnd.ms-excel" );
    else if (fileType.trim().equalsIgnoreCase("pdf"))
         response.setContentType( "application/pdf" );
    else if (fileType.trim().equalsIgnoreCase("ppt"))
         response.setContentType( "application/ppt" );
    else
         response.setContentType( "application/octet-stream" );
    response.setHeader("Content-Disposition","attachment; filename=\""+fileName+"\"");
    response.setHeader("cache-control", "no-cache");
    byte[] fileBytes=brsPlanDocument.getFileBytes();
    ServletOutputStream outs = response.getOutputStream();
    outs.write(fileBytes);
    outs.flush();
    outs.close();

    Hi,
    is this problem solved for you, I am also writing the java code to store different files in blob fields in database(db2udb) and allow users to open them through jsp pages. Upload seems to be working fine.....My big problem is only excel files are opened properly in both IE and Firefox. Word files, image files are not getting opened. Any suggestion as what I could be doing wrong....my jsp is kind of similar to the above one...
    thanks in advace, please guide me
    long pmsId = new Long(request.getParameter("pmsId")).longValue();
    String fileName = request.getParameter("fileName");
    int fileSeq = new Integer(request.getParameter("fileSeq")).intValue();
    if(fileName.endsWith("txt")) {
    response.setContentType("text/plain");
    log.debug(" this is a text file");
    } else if(fileName.endsWith("xls")) {
    response.setContentType("application/vnd.ms-excel");
    log.debug(" this is a excel file");
    } else if(fileName.endsWith("gif")) {
    response.setContentType("image/gif");
    log.debug(" this is a image file");
    } else if(fileName.endsWith("doc")) {
    response.setContentType("application/msword");
    log.debug(" this is a doc file");
    } else if(fileName.endsWith("pdf")) {
    response.setContentType("application/pdf");
    log.debug(" this is a pdf file");
    } else if(fileName.endsWith("ppt")) {
    response.setContentType("application/ppt");
    log.debug(" this is a ppt file");
    } else {
    response.setContentType("application/everythingelse");     
    log.debug(" this is a unknown ile");
    response.setHeader("Content-Disposition", "attachment;filename="+fileName);
    OutputStream out1 = response.getOutputStream();
    Class.forName("com.ibm.db2.jcc.DB2Driver");
    db2Conn = DriverManager.getConnection("jdbc:db2:TESTDB","db2admin","db2fv1000");
    //log.debug("connection obtained");
    pstmt = db2Conn.prepareStatement(" SELECT * FROM UPLOADDOCS WHERE PMSID = ? AND DOCSEQ = ? ");
    //log.debug("statemenmt prepared");
    pstmt.setLong(1, pmsId);
    pstmt.setInt(2, fileSeq);
    rs = pstmt.executeQuery();
    int count = 0;
    if(rs.next()){
    InputStream is = rs.getBinaryStream("DOCUMENT"); //"is" is
    //now the binary data
    //of the file
    byte[] buf = new byte[4096];
    int len;
    while ((len = is.read(buf)) > 0)
         out1.write(buf, 0, len);
    out1.close();
    out1.flush();

  • How to display the PK which is it alreday database sequence in a text field

    hi alllllllllllllll how to display the PK which is it alreday database sequence in a text field in form instance???

    2 ways,
    1) select the item in your SQL query and call it item_display - then you can treat it as a normal item with no impact on the database.
    2) Set the item to a display only item.
    Hope this helps,
    Russell

  • Text fields populated from lov mapping are not saved to database

    Hi Everyone,
    I'm having a wierd problem. My requirement is to autopopulate two text fields field 2 and field 3 when a value is selected from lov in field1 and save all the values to database on click of a submit button.
    Using lov mapping i'm able to populate field 2 and field 3 with corresponding values based on the value selected in field1. And also field2 and field3 should be in the readonly mode so that user cannot change the value.
    So to make the fields readonly i have changed the property of readonly to true for field2 and field3. But if I change the readonly property, the values for field2 and field3 are not being saved to database.
    The values are getting saved to database only when readonly = true for messageTextInput item type or if the item type is a form value.
    I also tried disable = true, which also didnt work.
    I tried to debug by writing some sop statements in PFR, but these statements also returned null for pageContext.getParameter("field2") etc;
    Can anyone please tell me how to solve this problem?
    Thanks
    Sunny

    Hi Gyan,
    I forgot to mention that , I also tried messageStyledText. Which also didn't work. I wanted to use vo.setAttribute as my last option, but i wanted to understand why the values are not saved to database when the text item is showing the values on the page.
    Thanks
    Sunny

  • How to show a database value in a text field

    Hi,
    i 'm using hibernate and jsf . i need to show some text field values . these values i need to take database and show. how can i do that ?
    Regards and thanks ,
    Sukesh

    What is the problem exactly?

  • Hiding first record from database in input text fields.

    Hi,
    I have 2 pages, a main page and a popup page. The main page has attributes from a VO in the form of input texts (I just dragged individual attributes) and a link that brings up the popup page. On the popup page I have an ADF Search Form and a Read-Only Table with selection. A user is able to search for records in the database then select the result and submit that row back to the main page which populates the input texts. When you first load the main page, the input texts that are linked to the VO iterator are already populated with the first row in the database. Is there a way to hide these values (but not the entire text fields) until after the user has searched from the popup?
    Thanks in advance.

    Hi,
    thanks much for the replies. Luc, I tried adding that Refreshcondition to the iterator in the pagedef and the result was when I ran the page, the textboxes and record would be gone but the label remained (close but I still need the empty box to show). Also, after running a search in the dialog box and submitting the result back to the main page, the values would still not show up, it just looked the same as when I first run the page.
    Did I put the RefreshCondition in the wrong place, or is it something else?
    Thanks again.

  • Autofill form text fields from database

    I have made a form in asp code with text fields. Behind this page is a database (access).
    This database contains static information and does not need to be updated. It is only for output.
    In this form, there are some text fields to be filled in.
    Reference
    First name
    Last name
    E-mail address
    Telephone number
    This information is in the database.
    What I try to do is that when the first text field "Reference" is filled, the related information is selected from the database and automatically put in the other corresponding text fields.
    Anybody any idea how to do this?

    I don't use ASP, but the simple way to approach this problem is to have two pages. The first page contains a form with a text field for Reference and a submit button. Set the form's method to GET, and the action to the page that contains the full form.
    In the page that contains the full form, create a recordset to select the details from the database, using the URL parameter for Reference as a filter. You can then bind the results from the recordset to the value attributes of the remaining form fields.

  • How to break mult-line memo(blob) field to single line text fields

    CRXI MSSQL
    I have a Memo field with variable numbers of lines.  How can I recognize end-of-line & break into seperate text field for each line?

    Hi James, 
    I'd recommend breaking it up in the database instead.  Create one field for each line, set each line to 30 characters and truncate after that.  Now you can have each line as a field in Crystal.  Drop them on and suppress them if they are empty. 
    Not pretty but it will work. 
    Good luck,
    Brian

  • Storing a file in a BLOB field in the database through forms

    Hi, I want to have a form that lets the user choose a file he has on his client side and load this file into a BLOB field in the database.
    I know how to use "GET_FILE_NAME" to get the file, the second part is what I'm having problems with. Do I use an OLE object? How do I initailize it? Or what is the best way to go? Thanks.
    --Bassem                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Are you looking for something like this?
    DECLARE
       l_temp  clob;
       l_text  varchar2(2000);
    BEGIN
        l_temp := httpuritype('http://www.oracle.com/PO.xsd').getclob;
        l_text := substr(l_temp, 1, 2000);
        dbms_output.put_line(l_text);
    END;N.B.: Not Tested...
    Regards.
    Satyaki De.

  • Search database fields using single text field

    Kindly advise on how to develop a database search page such
    that there is
    single text field to enter serach string and the results are
    shown on the
    same page.
    ALso guide if there is any extension available for achieving
    the above.

    I understand what you say.
    What I am looking for is a wizard or an extension which
    creates the form, as
    well as writes the SQL string and also generates the results
    page
    (preferably on the sarch page itself).
    I am looking for a google like solution where the site
    homepage has one text
    field, and users can search for all the fields of a database
    to give results
    on the same page.
    Please help.
    "malcster2" <[email protected]> wrote in
    message
    news:gg9g8b$lf9$[email protected]..
    > the simplest way of doing it is to have an input box and
    a submit button
    > in a
    > form,
    >
    > when the submit button is pressed, the text in side the
    input box is
    > posted to
    > a variable.
    >
    > the variable is then inserted into a mysql select
    statement, and the
    > results
    > are then echoed to the screen.
    >
    > all of this using php.
    >
    >
    >
    >

  • Wrap a single word in a text field

    Hello everyone!
    I currently have a problem with text data that is displayed in a Flex text field <mx:Text>.
    It's a narrow textfield (100px wide) in a animated ad banner that displays content from a database. There are some words that are too long for the available space, so flash wraps some letters to the next line. I have attached a screenshot that shows the actual problem.
    The text is shown in a Java web-application as well, and since that Java app is displayed as a normale webpage, there is a lot more space for the text. I cannot put hyphens into the text because it would look weird in the normal web view.
    Is there a way to make automatic hyphenation happening when Flash wraps a single word?
    It would be perfect to get language-specific correct hyphenation, but a hyphen at the wrong spot is still better than no hyphen at all.
    Thanks for your time and help!

    I think your simplest bet would be to use mx:label and use the op
    tion truncateToFit="true". Also adjust the width so that the text appears prope
    rly. Hope this helps..!!

Maybe you are looking for

  • Administrators only access PDP

    Hi All, In Project Online or Project Server 2013, is there a way to have a PDP page available to all workflow stages but editable / visible to Administrators only? Thanks!! GeorgeTU

  • What port do I connect my express to on the back of my modem?

    I am trying to install my new Airport Express but I do not know what port to use on the back of my modem. Do I go WAN to WAN or do I have to pick one of the other ports?

  • How to call plsql procedure in jasper

    Hi, anybodys know how to call plsql in jasper.. i have try this code in jasper -> select query langiuage = plsql {CALL STD03_MERIT_PROCESSING($P{std03_studentVal},$P{std03_studentVal})} but there is error taht said no data found.. any idea Thnak You

  • Completely clearing out a child?

    I've having a problem when I am removing a child.  There is an area where you can choose a button to click(there are multiple buttons here).  Once you click a button it loads workss_mc and you can go back from there and workss_mc is being removed the

  • Can I uninstall iTunes as it is going to take 5 hours to update?

    Can I uninstall iTunes and reinstall  as it is going to take 5 hours to update? Will I loose everything?