How to save and retrieve jpg/gif format image in db2

Here am facing problem to insert jpg/gif format image in my database. And at the same time i would like to know how to retrieve that and how to display that image in my html page. So please help me in this matter.

In future JDBC questions should be posted into the JDBC Forum

Similar Messages

  • WPF- How to save and retrieve details from database

    I want to develop an desktop app to save and retrieve details from database, but am having a little hitch
    am getting errors in my code, kindly advice below are the required code
    xaml
    <Grid>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,28,0,0" TextWrapping="Wrap" x:Name="TbxId" VerticalAlignment="Top" Width="193"/>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,134,0,0" TextWrapping="Wrap" x:Name="TbxFn" VerticalAlignment="Top" Width="193"/>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,77,0,0" TextWrapping="Wrap" x:Name="TbxLn" VerticalAlignment="Top" Width="193"/>
            <Label Content="Student ID" HorizontalAlignment="Left" Margin="10,28,0,0" VerticalAlignment="Top" Width="101"/>
            <Label Content="Last Name" HorizontalAlignment="Left" Margin="10,134,0,0" VerticalAlignment="Top" Width="101"/>
            <Label Content="First Name" HorizontalAlignment="Left" Margin="10,77,0,0" VerticalAlignment="Top" Width="101"/>
            <Button x:Name="BtnSave" Content="Save" HorizontalAlignment="Left" Margin="23,206,0,0" VerticalAlignment="Top" Width="75" />
            <Button x:Name="BtnBrowse" Content="Browse" HorizontalAlignment="Left" Margin="149,206,0,0" VerticalAlignment="Top" Width="75" Click="Save"/>
            <Button x:Name="BtnShow" Content="Show" HorizontalAlignment="Left" Margin="294,206,0,0" VerticalAlignment="Top" Width="75"/>
            <WindowsFormsHost Grid.Column="0" Margin="448,28,75,243">
                <wf:PictureBox x:Name="pictureBox1" Height="150" Width="150" SizeMode="StretchImage"/>
            </WindowsFormsHost>
        </Grid>
    cs
    private void Browse(object sender, RoutedEventArgs e)
                SqlConnection cn = SqlConnection(global::DatabaseApp.Properties.Settings.Default.Database1ConnectionString);
                try
                    OpenFileDialog dlg = new OpenFileDialog();
                    dlg.Filter = "JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif|All Files(*.*)|*.*";
                    dlg.Title = "Select Student Picture";
                    if (dlg.ShowDialog() == DialogResult.OK)
                        imgLoc = dlg.FileName.ToString();
                        picStu.ImageLocation = imgLoc;
                catch(Exception ex)
                    System.Windows.MessageBox.Show(ex.Message);
    Thank you
    Jayjay john

    Hi Joakins,
    I think Lloyd has a point here in that all I see there which is really database related is a connection string.
    Maybe your question is more general though and you're just asking how to work with a database as a general principle.
    Personally, I like entity framework and would recommend that.
    You can read a shed load of stuff about it.
    https://msdn.microsoft.com/en-gb/data/ef.aspx?f=255&MSPPError=-2147217396
    With WPF almost every dev uses MVVM and I'm no exception.
    You may find this interesting:
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The article for the second in the series is only partly written, but the sample is complete:
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • How to save and retrieve an excel file as an object into lob column?

    Hi ,
    I need to save and retrieve the whole excel file with 3 or more sheets as an object into the lob column of table.
    For example:
    t_docments
    (doc_id number,
    excel_data clob
    All excel files need to be saved to excel_data column.
    What should I do?
    Thanks

    Did you check the asktom thread posted by Jens?
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P1
    1_QUESTION_ID:232814159006
    There's example of varies file types.Yes, I did try some examples.
    Those work for .doc/.pdf/.jpg files, BUT NOT for excel file.
    The following error happened when retrieving excel file(retrieving .doc/.pdf are OK)
    ORA-29285: file write error
    ORA-06512: at "SYS.UTL_FILE", line 18
    ORA-06512: at "SYS.UTL_FILE", line 375
    ORA-06512: at "SYS.UTL_FILE", line 990

  • How to save and retrieve 3D data

    Hi, all:
    I have several 3-D data and each one has a very large and different size. I saved them in 1D using Write to binary file after reshaping the data, and retrieve it after the user key in the size of the data so that my code can reshape the data into a correct size.
    My first question is, is there any way to save the data directly into a 3D format so that the user can retrieve the data without knowing the size? For example, I have the data A in 55(row)x512(column)x500(frame) and the data B in 3(row)x1004(column)x1500(frame). Is there any way to save and retrieve them without the need to know their size in advance?
    My second question is, I will generate several data set like this and save and retrieve them during data collection. I found that it always takes a long time to save the data, and longer time to retrieve the data. Is there any way better than saving in binary to reduce the time?
    I am using LV 8.2. I tried to search the previous posts for the answers but found that some downloaded examples gave me a warning that my current version couldn't support the function.
    I would very appreciate for any suggestion and example code to help me. Thank you in advance.

    By default, LabVIEW will prepend the array size when you write binary data, so all you need to do is wire an empty 3D array of the correct type to the "data type" input when you use "read binary file" and everything will fall into place. Have you tried?
    (Edit: Ahhh, Smercurio... was faster once more. ) 
    Message Edited by altenbach on 09-04-2008 02:32 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    3DBinary.png ‏6 KB

  • How to save and retrieve table column values added via view enhancement

    Hi,
    I want to enhance standard webdynpro component FITE_VC_REVIEW.
    I want to add new column to Fight Info Table and also to Hotel Info table.
    First Approach: I add new fields to Flight Info and Hotel Info structure.
    Create an additional Coolum in Flight Info and Hotel Info Table and Bind it to newly created field in structures.
    Question
    What all changes I have to make to save and retrieve values from database table.
    Kindly guide with Steps
    Second Approach: I create a new table/structure for my requirement and bind table column to these fields.
    Question:
    What all changes I have to make to save and retrieve values from database table.
    Kindly guide with Steps
    And which approach will be good.
    Regards,
    Madhvika
    Moderator message: please have a look in the dedicated "Web Dynpro ABAP" forum.
    Edited by: Thomas Zloch on Feb 16, 2011 3:02 PM

    no ans yet

  • How to save and retrieve an image in JSP/Java and MS SQL/server 2000?

    Hi All,
    I am uploading an image from the JSP page and want to store it in MS SQL server. I have made a column by the name "COMPANY_LOGO" with data type as image MS SQL/server 2000. How do I save the full image in the table and how do I display the thumb nail image on the JSP page???
    Regards,
    Raj

    BEFORE YOU POST A TOPIC HERE: Please be sure your topic is related to features or functionality of this site. This forum is not for general technology questions. Not sure which forum to use? Try searching for your topic in the "Search Forums" element on the left panel.
    Post your question in
    http://forum.java.sun.com/forum.jspa?forumID=45
    or
    http://forum.java.sun.com/forum.jspa?forumID=48
    Do not reply here

  • Officejet 6110xi, How to save scan as .jpg?

    officejet 6110xi, How to save scan as .jpg?

    Hello jpg0, and welcome to the HP Forums, I hope you enjoy your experience!
    I see you are looking into your scan settings.  I would love to try and help you, but I do need a little information first. I am linking a few HP Support documents below that will show you how to find which operating system you are using. Also, if you're using Windows, please include whether your operating system is 32-bit or 64-bit. With this information we can provide you with accurate information.
    Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
    Which Windows operating system am I running?
    Is the Windows Version on My Computer 32-bit or 64-bit?
    Please let me know what you find, and thanks for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • I have a windows 7 desktop with an external hard drive setup on my home network, will i be able to access this on my home network to save and retrieve files from my mac air?

    i have a windows 7 desktop with an external hard drive setup on my home network, will i be able to access this on my home network to save and retrieve files from my mac air?

    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972

  • How to save a invoice in Word Format

    Dear  Sd Gurus
    Please tell how to save a invoice in any format like word format other than the printed stationery .This saved document will be used for mailing to the customer.
    No interface with internet or EDI .
    Hope for a reply soon
    Satish Kullu

    Hi Satish,
    First, your SAP system must be configure by the basis people in order for you to send an external mail. 
    Whether it can send pdf or other file format will depends on the Mail Server you are using.
    The basis people must also maintain the conversion parameters so that SAP knows how to convert the billing documents to be send as a pdf file or other desired format specified by your company.
    Finally, you have define the IMG in Maintain Output Determination for Billing Documents (Output type MAIL) 
      Reward points if this helps.
    Regards
    Karan

  • How to save and retrive table column values added via view enhancement

    Hi,
    I want to enhance standard webdynpro component FITE_VC_REVIEW.
    I want to add new column to Fight Info Table and also to Hotel Info table.I can do UI changes via view enhancement .
    First Approach: I add new fields to Flight Info and Hotel Info structure.
    Create an additional Coolum in Flight Info and Hotel Info Table and Bind it to newly created field in structures.
    Question :
    What all changes I have to make to save and retrieve values from database table.
    Kindly guide with Steps
    Second Approach: I create a new table/structure for my requirement and bind table column to these fields.
    Question:
    What all changes I have to make to save and retrieve values from database table.
    Kindly guide with Steps
    And which approach will be good.
    Regards,
    Madhvika

    no ans yet

  • How to save and  move an application

    Hi,
    I have made an application on Oracle Express. How to save and move that to another machine ?
    Many thanks.

    I'm in the process of porting my XE app to a 10.1 instance.
    I created an app export and export file of the schema. Then I installed a client on the same machine so I could connect and I get errors detailed in the end of this thread when attempting to import. Most of the tables are successful however, none of the procedural code goes in. The app export imported fine.
    Now, I can manually copy the objects that remain but only if I can connect to XE and this ability seems to have been lost with the install of the 10.1 client.
    Does anyone know how I can connect to XE using PLSQL Developer or is it indeed possible to connect to XE on a machine that is configured to also connect to a 10.1 remote server? I have installed the 10.1 client into a new Oracle home.
    . importing CODESPEED's objects into PRIMPATH
    IMP-00008: unrecognized statement in the export file:
    IMP-00017: following statement failed with ORACLE error 1950:
    "CREATE TABLE "FOLDER" ("FOLDER_ID" NUMBER NOT NULL ENABLE, "STAFF_ID_CREATE"
    "" NUMBER NOT NULL ENABLE, "STAFF_ID_MODIFY" NUMBER, "FOLDER_NAME" VARCHAR2("
    "100) NOT NULL ENABLE, "FOLDER_CREATED" DATE NOT NULL ENABLE, "FOLDER_MODIFI"
    "ED" DATE NOT NULL ENABLE, "FOLDER_NOTES" CLOB, "FOLDER_OWNER" NUMBER NOT NU"
    "LL ENABLE, "DRA_VERSION_ID" NUMBER, "ASSIGNED" NUMBER NOT NULL ENABLE, ""
    "UNASSIGNED" NUMBER NOT NULL ENABLE, "APPROVED" NUMBER NOT NULL ENABLE, "FOL"
    "DER_STATUS" VARCHAR2(1) NOT NULL ENABLE, "CODING_RULE_SET" NUMBER) PCTFREE"
    " 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FR"
    "EELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRESS "
    "LOB ("FOLDER_NOTES") STORE AS (TABLESPACE "USERS" ENABLE STORAGE IN ROW CH"
    "UNK 8192 PCTVERSION 10 NOCACHE LOGGING STORAGE(INITIAL 65536 FREELISTS 1 F"
    "REELIST GROUPS 1 BUFFER_POOL DEFAULT))"
    IMP-00003: ORACLE error 1950 encountered
    ORA-01950: no privileges on tablespace 'USERS'
    IMP-00017: following statement failed with ORACLE error 2248:
    "ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL = 2 NLS_LENGTH_SEMANTICS = 'BYTE' PL"
    "SQL_CODE_TYPE = 'INTERPRETED' PLSQL_DEBUG = TRUE PLSQL_WARNINGS = 'DISABLE:"
    "ALL'PLSQL_CCFLAGS = ''"
    IMP-00003: ORACLE error 2248 encountered
    ORA-02248: invalid option for ALTER SESSION
    IMP-00000: Import terminated unsuccessfully
    C:\Documents and Settings\PWin>

  • How to save and edit a Word template and excel??

    How to save and edit a Word template and excel (extension. doc and. xls) in an XE database, which can be opened to allow the document and record all changes made by the user of the palicacion.
      or where it a clear tutorial on this topic.?
    I appreciate your attention and collaboration.
    good day ...

    You should not expect to do this in Oracle. But by .net, it can be fine
    http://www.codeproject.com/Articles/36432/Edit-Microsoft-Word-Document-From-Your-Application

  • How to store and retrieve blob data type in/from oracle database using JSP

    how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
    thanks

    JSP? Why?
    start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html]

  • Built-in SSH Terminal question on how to save and exit

    Howdy, Heres my question and problem.
    I haven't been able to figure out how to save and exit the editor for the SSH terminal that the mac has. I've read that to save you press control -O hit return and to exit hit control -X but that doesn't seem to be working.
    I'm trying to install imagemagick onto my web server and I get stuck at that point of saving and then exiting.
    can anyone tell me how to save and exit the editor?
    I hold down control press -O i let go of the buttons then i press control -X and it stays at the same editor like nothing happened. I try quitting the terminal and reloading it all but that just causes me to restart and nothing saved. and I actually hit the "-" key should i do that or no?
    heres the instructions I'm following for the imagemagick install.
    (For this next part, if you don't have "pico", you can use "vi" instead)
    $ cd libtiff-lzw-compression-kit
    $ pico Makefile
    change
    TIFFSRCDIR = /tmp/libtiff
    to
    TIFFSRCDIR = ../tiff-v3.5.5
    Then save and exit the Editor $ make install
    $ cd ..
    $ cd tiff-v3.5.5
    $ ./configure
    thanks for any help
    -Ahufs

    ctrl+x (thats both keys at the same time) will invoke the exit of the program. at wich point if youve made changes to the file it will ask you if you want to save the data or not. If yes you need to type yes or y and hit enter... if no then no or n. Then it will ask you what you want the file name to be with the default being whatever the file was that you opend to buffer to work on so in most cases you hit enter again.
    hitting ctrl+o (thats both at the same time again) should write the file out and close the application without prompting i think (i dunno for sure... i always use ctrl+x myself).
    At least thats on the OS X version of pico... your server is probably linux so it may differ although i wouldnt expect it to. my pico bindings have always been the same from Debian to CentOS to Darwin.
    Also i msut ask... why cant you pass the TIFFSRCDIR as an option to ./configure like normal instead of manually editing the make file?

  • LRv3.2 Networking with an Asst , How to store and retrieve updated work on Win7?

    LRv3.2 Networking with an Asst , How to store and retrieve updated work on Win7 Network?
    We have a working 1gig network in Win7 PRO 64-bit.  and using LRv3.2
    * How do I configure our Files or Cataloges "so"  ALL Edits are veiwable/edit to all?   (we don't work on the Same Shoot/Folder at the same time)
    I NEED to see,  ALL the LR  Edits  (is great with DNG files
    *** BUT,  what I cannot see if I remember correctly (with just the DNG sharing)  is the  CROP or Virtual Copys ... possibly the Brush edits.
    HOW, do I configure to be able to read and edit ...  ALL of the updated/saved  Edits???   (after it is done by my asst.)
    Is creating a New Catalog for EACH  shoot the way to go?   (not sure I like this idea)
    Right now everything is in one(1) catalog  ... and it's getting big ... BUT, this allows us to search , and group ... going way back.
    Would be nice to be able to still do this easily, and with what we have already done.
    With our one BIG Catalog ... not sure if two(2) can access this catalog over the Network at the same time?
    Even though we never Edit the Same Folder or Files at the same time.
    Or will that be a problem over a simple Win7 PRO network?
    Thank you,
    HG

    Aloha Bob,
    Saw your link.  thank you.
    At least I don't feel "alone"  LOL
    At this point ... I am looking for a  "cluncky"   Work Around?
    * I was thinking,  Maybe making a copy of  My Cataloge ...
    Deleting ALL the  Folders in LR  ... except for the one's  that  will be worked by the Asst.
    Then moving that file to the  Asst.  Computer.
    * NEXT,  pointing the  Folder that they are working on ... across the Network to the Servers Files.
    * After they work on it:
    *** IS THERE A WAY ...
    * To  take that Cataloge ... and UPDATE  my Main  Cataloge.
    THIS, is the STEP  ... I don't know how to do.
    Can someone Help me with this?
    Step by Step,  because I am clueless ....
    Talking UPDATE of everything worked on ... including   Virtual copys, and  CROPS.
    Thank you,
    HG

Maybe you are looking for