Storing images using C++

Hi All,
I need to store images in form of BLOB to Oracle 8i (8.1.6) database. The program that is accessing Oracle runs on Windows and is written in C++. Can anyone send me a sample code how to store images to the database.
TIA
Roumen :-)

Hi
I had a project with this task. I haven't source because it was not part of may job but we used Oracle Objects for OLE and it was very easy. There was examples in help files of OO4O.
It is easy to use OO4O from C++ if you write Windows application instead of direct OCI calls.
Regards
null

Similar Messages

  • Storing Images using Datatype BLOB

    Hi
    I have never worked with storing and retreving images into the database using BLOB datatype? I would apprecite if anyone can guide me to a write up or instructions . I will be using Oracle Forms 6i to do so.

    - Can you post the SELECT statement?
    - Can you post the error message?
    - Which version of the Oracle ODBC driver are you using?
    Justin

  • I have just bought a hdmi tv and would like to view very high quality images, using apple tv, stored on my external hard drive. I also have blue ray movies stored on my external hd. will i be able to stream these to my tv and view them in 1080p?

    I have just bought a hdmi tv and would like to view very high quality images, using apple tv, stored on my external hard drive. I also have blue ray movies stored on my external hd. will i be able to stream these to my tv and view them in 1080p?

    sorry, why isn't correct?
    i try convert video with quick time to apple tv, import in itunes( that's ok)  but is impossible to synchronize my apple tv ( unsupported file).
    where I wrong?
    please could you explain me the correct procedure?
    i have some video ( holiday movie an photo movie in mpeg2 full HD) to convert for apple tv, and from 2 years some video editing with imovie.
    normally I prepare my video with Imovie, create a file .mov full hd (like master)  and with roxio convert file for apple TV.
    apple world is new for me, after 25 years with microsoft!
    thank so much
    mauro

  • Storing Images In Oracle 9.2 Using Forms 6i

    When my database was 8.1.7, storing Images in the database in BLOB field worked fine through Form 6i. But when the database was upgraded to 9.2 then the images are not loaded in the database through Forms 6i.
    Kindly help
    Thanks

    Hi,
    I wanted to do the same thing and faced the same problem. I'm working on Forms 6i and Oracle 9i as backend.
    When an Image item is created on forms, it's datatype is set to Long Raw. You can see this by changing the type of the image item to text item. You'll see that the datatype is Long Raw. The idea of inserting the image would work perfectly if you set the datatype of the column to Long Raw in the backend.
    For using BLOB... I searched alot but all in vain. No answer as to how to handle BLOB in Forms 6i.
    Do let me know if you get a way out.

  • Displaying server stored images in an air application

    Usually when I go about displaying server stored images in a regular flex application I go about it the following way:-
    - Create a mysql database table on a server which contains image names
    - Create a php file which generates all of the image namesfrom the table as xml and upload this file to the server
    - Create a new flex application/project
    - In the application make a http service which points to my php/xml file and turns this data into an array collection
    - Set the array collection to the dataprovider of a tilelist component so that all of the images will eventually be displayed within it when they are created
    - I set the itemrenderer of the tilelist to an image component which has it's source set to something like source="{'assets/images'+ data.imagename}" with imagename being the field containing the name of the image which is stored in the mysql database table.
    - Make a folder in the app/project called assets/images which will contain all of the images
    - Upload the app to the server and once it runs all the images will be displayed in the application
    - Then any images that are uploaded to the server can also be displayed as long as their names are added to the mysql database
    My question is though how do you get server stored images to display within an Air Application? My air app will be used on multiple machines but I want the images in it to be dynamic i.e. stored on a server and can be changed. How can this be done?

    I'm struggling to figure out how to access the image files when the assets/images folder will be on a server and the app itself will be on the user's desktop whereas usually in the case of a regular flex app this wouldn't mater as both the app and the image files would be on the server together. Is what I'm trying to do possible i.e. displaying images on a desktop air app straight from a server?

  • How to read the stored images

    hi
    i have images in my table img,
    i want to know how toretreive that stored image

    i have images in my table img
    > i want to know how toretreive that stored image
    How to retrieve it depends on how it is stored? What is the data type? Is it perhaps a blob (large object in binary format)? If so check out the package dbms_lob and read Application Developer's Guide - Large Objects. If not connect to your database using sql plus to publish the data type for the image column from the command "describe img".

  • Deleting images using iPhoto and a 128GB SD card and a Sony a6000

    I am having a problem with deleting images after transfer to my mac using either iPhoto or Aperture (All newest version) under Yosemite 10.10.2. What happens is I can transfer images and video from the a6000 into my mac but when asked to delete and answering that it is okay to delete I run into an issue. When after deleting the images in iPhoto and looking at the a6000's stored images there are blanks that have the filenames but know images. I have to format the SD card to get them cleared off the SD card. I would say it is a bug. It happens in both iPhoto and Aperture. And this occurs regardless of if I use an SD USB reader or hook up the camera video USB. The bundled software called PlayMemories from Sony doesn't has a feature to delete the images off the camera. The a6000 is a newer model and I think the way Sony organizes things on the SD card is crazy but it would be nice to have the delete feature in iPhoto actually works like every other camera I've owned.

    Yes but... you really don't want to use the iPhoto delete feature.
    Never let your computer erase data without you first checking that the data is safe. Specifically never use iPhoto (or any other app) to delete the photos from your Camera Card. Disconnect the camera, check the transfer has gone correctly and then use your Camera to Reformat the Card. This has three advantages:
    1. You know your data is safe - because you've taken the time to check it.
    2. Reformatting the card is much, much faster - takes a couple of seconds
    3. Reformatting also refreshes the Directory Structure on the Card, helping prevent issues with the card and prolonging its life.
    But that's my 2 cents.

  • Print Images using FOP

    Can we print images using FOP by taking it from the database ? Iam using the FOP and outputing to a PDF. However, I have an image that I would like to print. The image is stored in the database as a BLOB. How can I print this image in the PDF document ?
    (b) Alternatively, if this is not possible, do we need to move the image to a physical file system and use <img src> and print ? If so, how can we move the image to the file system ? I found only UTL_FILE can do this ? But Iam not sure if it can work properly for Image file. When I tested this using utl_file, my image file got corrupted.

    Hi there, from what type of device are you trying to print the images from e.g. a smartphone/tablet or a PC/laptop?
    Best
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • Can  I write titles of comments on the picture image using iPhoto?

    I will like to be able to write titles or labels in the pictures stored on iPhoto files without the need to go to another photo software.
    Is it a way to write descriptive titles on the image using iPhoto?
    Thank you
    g5   Mac OS X (10.4.8)  

    punkylobo:
    Welcome to the Apple Discussions. You will need a 3rd party editor like GraphicConverter or Photoshop Elements 3. Also Gimp is an open source version of Photoshop that would do it. You can find the first two at VersionTracker.com and the other thru a Google search. No matter what editor you use you set up iPhoto (in its preferences) to use that application as the editor of choice when you double click on a thumbnail. You never want to open a file directly thru the editor.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.

  • Blob Problem (storing Images)

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    I think that both your SQL is wrong and your intended use is wrong. According to the SQL reference, the following seems to be a simplified definition that seems to match what you're trying to do. UPDATE &lt;table&gt; SET &lt;column&gt; = &lt;expr&gt;. So PROPERTIES should be a &lt;table&gt; of some kind and X should be a &lt;column&gt; of that table. This changes your PreparedStatement to *"UPDATE PROPERTIES SET X = ? WHERE NAME = ?"* Then you can do ps.setBlob(1, b) and ps.setString(2, ...). Because your statement is DML you must do ps.executeUpdate(). So your code might look something like this.
    Blob b = ...;
    String x = ...;
    ps = c.prepareStatement("UPDATE PROPERTIES SET X = ? WHERE NAME = ?");
    ps.setBlob(1, b);
    ps.setString(2, x);
    int i = ps.executeUpdate();
    The executeUpdate() returns the row count (i.e. number of rows) of your DML statement. Try that and see if it helps.

  • Which is better datatype for storing Images in 11gr2 Database ?

    Can anyone tell me which datatype should be maintained for storing images in database in terms of
    1. Space
    2. Speed.
    And, Is there another way for storing images instead of database ?
    Thanks/Regards in advacne.

    982164 wrote:
    Which one have better speed, database system or file system ?Database is better all around. It is not just a question of speed. It is a question of storage, security, flexibility, scalability, robustness and so on.
    If you use ASM and raw devices from a storage array or SAN, how do you get o/s files onto that? (requires a file system on the SAN/array LUNs)
    If it is inside the database, database security, concurrency and consistency apply to the image. Outside the database? How do you control who has access? Prevent someone with slippery fingers from accidentally deleting/renaming/moving images files? How do you backup up the image data with the image attribute data in the database?
    Having all this inside the database, part of the database, managed by the database, provides you with more flexibility, robustness, and security. After all a RDBMS is a data management system - it is designed for managing data. And that includes managing binary data.
    As for speed. Reading a 24MB image is reading 24MB worth of data. Whether that data is read by process A from disk1, or process B from disk2 - the amount of data is the same. So if you want faster I/O, then use faster disks. If disk1 is faster, process A will perform better reading the image than process B. If disk2 is faster, the roles are reversed.
    So I/O speed is not a direct function of process A or process B. It is a direct function of the I/O storage and fabric layer. Yes, a process's method of I/O can make a difference (e.g. using block reads not aligned with the physical blocks on disk). But this is more a configuration issue than process doing badly designed I/O calls.
    So the speed question is a bit loaded as it has more to do with the architecture and design of the I/O system - and less to do with the process doing that I/O. You can have a highly optimised I/O process doing poorly using an old and slow I/O layer, and poorly written I/O process doing pretty well on a SSD I/O layer.
    Databases like Oracle is designed for dealing with data - and thus effectively dealing with I/O. Lots of it. For lots of data. So I/O process design is not a consideration. The database processes will use the I/O layer as optimally as possible and as configured.

  • Storing images inside the database

    hi,
    we are running oracle 9ir2 on Solaris and would like to know how to go about achiving the following:
    would like to be able to read/write/create/delete bitmap image files in a file share on the same server as the database which would be stored in a table within our schema in the form <filename varchar2>,<image-file-contents blob>
    Is this possible?! If so - any pointers in the right direction would be great!
    thanks,
    p

    To some extent, this was covered a few days ago in the PL/SQL forum. There are some examples of uploading image files to blobs in the database here.
    upload any file (like .DOC,.JDG) to oracle database?
    If you want the images to be visible on a file system, you may want to use BFILE's, rather than BLOB's. BFILE's are essentially pointers in the database to file system objects, while BLOB's are stored completely in the database. The major disadvantages of BFILE's are that
    - the file may be deleted or moved, leaving the Oracle BFILE pointing at nothing
    - the file won't be backed up with the rest of the database
    Going up a level of sophistication, you could store the images using interMedia. This gives you significantly more options for manipulating the images within the database.
    Finally, you can use Oracle iFS (or whatever it's been renamed to today) to provide a file system interface to an Oracle database. This is the most robust of the options, but is also the most work to configure.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Help Storing Images in rms

    Hola, Did someone get to stored sussecfully images in teh rms? I capture an image using MMAPI : snapshot() and i get a byte[] tyhat is waht I store in teh rms, but when open teh application again I get a error, I guess for the size of the picl, but I cvant choose the resoultion.l Actually teh pics are like 40 K and my applicatio is suppose to handle the capture and storage of 2 pics. OS i create a recolrd store recordPic= new byte[80000].
    Any ideas?

    You could also check whether this 10K for each picture is still working okay, by checking whether it is possible to save and reload a thumbnail of that picture.
    You've already read the article at http://developers.sun.com/techtopics/mobility/midp/articles/picture/.
    But it has a private method that can be used for testing a thumbnail and use that for saving in the rms. When you can read that image back again, then there's nothing wroing with how're you constructing the image. Then it's related to the image size.
    See this method (copied from the article) and use it for creating a thumbnail:
      private Image createThumbnail(Image image) {
      int sourceWidth = image.getWidth();
      int sourceHeight = image.getHeight();
      int thumbWidth = 64;
      int thumbHeight = -1;
      if (thumbHeight == -1)
        thumbHeight = thumbWidth * sourceHeight / sourceWidth;
      Image thumb = Image.createImage(thumbWidth, thumbHeight);
      Graphics g = thumb.getGraphics();
      for (int y = 0; y < thumbHeight; y++) {
        for (int x = 0; x < thumbWidth; x++) {
          g.setClip(x, y, 1, 1);
          int dx = x * sourceWidth / thumbWidth;
          int dy = y * sourceHeight / thumbHeight;
          g.drawImage(image, x - dx, y - dy,
              Graphics.LEFT | Graphics.TOP);
      Image immutableThumb = Image.createImage(thumb);
      return immutableThumb;
    }

  • Load Multiple Images using link in Crystal Report

    Hi Guys,
    I am currently in need of developing a new requirement for our company's client. We have to load multiple images using just link in Crystal Report. Let's say that the images are stored in a folder (e.g., C:\Datafolder\Images\) and i have to fetch two images to show in crystal report (say, C:\Datafolder\Images\imageval1 and C:\Datafolder\Images\imageval2). These are actually dynamically created and therefore the number of images are not known and so i have to iterate through the list of image links.
    Is it possible using merely crystal report and how?. Please take note that we're also using C# in developing our software applications.
    Thanks and best regards.
    ---CHITO--

    Hi Chito,
    You cannot load multiple images dynamically. Using the 'graphic location' formula for the OLE Object, you can only point to a location that can load one image.
    For the second image, you'll need to manually insert another OLE Object and point the formula to the next image's location.
    You can try posting to the SAP Crystal Reports, version for Visual Studio space to find out whether this can be done using CR SDK.
    -Abhilash

  • Storing images to persistent storage

    Hi all
    Does anyone know a good tutorial for storing images to persistent storage?
    I am comfortable in the process of storing items such as int and string etc.
    writeUTF ()
    readUTF()
    etc...But i cannot see how to store an image? and the inverse how to load the image back up.
    Mainly my lack of knowledge hinges on the fact that I do not know how to convert an Image to a byte array and make an image from a byte array?
    Then using this byte array what methods I uses from the DataOutputStream and DataInputStream for population?
    If anyone knows or can help would be very grateful?
    jimbobegg

    For anyone concerned heres a solution I used in its own class:
    public static void convertImageAndStore( Image photo, DataOutputStream daos )
         int imageWidth, imageHeight;
         imageWidth = photo.getWidth();
         imageHeight = photo.getHeight();
         int[] imgRgbData = new int[ imageWidth * imageHeight ];
         try
              photo.getRGB(imgRgbData, 0, imageWidth, 0, 0, imageWidth, imageHeight );
              //Start to write the different parts to the
              //DataOutputStream
              daos.writeInt( imageWidth );
                    daos.writeInt( imageHeight );
                    daos.writeInt( imgRgbData.length );
                    //Serialize image and store
                    //Serialize the image raw data
                    for (int i=0; i<imgRgbData.length; i++)
                        daos.writeInt(imgRgbData);
         catch( Exception exc )
              System.err.println( "Exception thrown by Utility::convertImageAndStore()");

Maybe you are looking for

  • HT201363 I cannot find the answers to my security questions for Itunes and cannot figure out how to reset them

    I cannot find the answers to my security questions for ITunes and cannot figure out how to reset the questions.

  • 2 Office 365 Questions

    1. Is there a roadmap for features to be added to the SDK API? 2. Why can I not create accounts/mailboxes with the SDK API? Thanks

  • Darken Text to form pattern

    Hi, I have a paragraph of text and I want to change color of some characters to form a big "CRE".  In other words change some characters in the paragraph to blue so they form CRE in larger text. I was thinking of having two copies of the test, crop o

  • SAP recommendations for locking transactions

    Hi, Sappers. I recall seeing a document a while back that had a list of "sensitive" or "critical" transactions that were "recommended" to be locked at the customer in accordance with SOX or audit compliance. I asked an external audit company about th

  • Can't import .MXF files into FCP7

    I have several .MXF files (Sony XDCAM) I'm trying to import into FCP7. I downloaded the plug-in from Sony's website, and installed it -- but Log & Transfer does not allow me to import the .MXF files. What should I do? (I've also tried ClipWrap -- did