Insert Image and Load Image by VC# with Oracle 9i Database.

I need save and load a Image to Database Oracle 9i, i use BLOB Datatype and VC#2003, i write code bellow:
Load image data.
m_Img is a parameter byte[], and :
this.openFile.ShowDialog(this);
string strFn=this.openFile.FileName;
this.pcPerson.Image=Image.FromFile(strFn);
FileStream fls;
fls=new FileStream(@strFn,FileMode.Open,FileAccess.Read);
m_Img=new byte[fls.Length];
fls.Read(m_Img,0,System.Convert.ToInt32(fls.Length));
fls.Close();
//Add Parameter
CnnOracle myBase = new CnnOracle();
string reqSQL = "SP_PERSON_UPDATE";
try
OracleConnection myConn = myBase.OpenConnection(myBase.cnxString);
OracleCommand myCommand = new OracleCommand(reqSQL,myConn);
myCommand.Parameters.Add(new System.Data.OracleClient.OracleParameter("Faxno", System.Data.OracleClient.OracleType.NVarChar, 20));
myCommand.Parameters["Faxno"].Value = myPerson.faxno;
myCommand.Parameters.Add(new System.Data.OracleClient.OracleParameter("Email", System.Data.OracleClient.OracleType.NVarChar, 20));
myCommand.Parameters["Email"].Value = myPerson.email;
myCommand.Parameters.Add(new System.Data.OracleClient.OracleParameter("Photo", System.Data.OracleClient.OracleType.Blob));
myCommand.Parameters["Photo"].Value = m_Img;
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.ExecuteNonQuery();
myBase.CloseConnection(myConn);
catch(Exception myErr)
throw(new Exception(myErr.ToString() + reqSQL));
That code above don't run and have a error: "ORA-01460: unimplemented or unreasonable conversion requested\n",
but i clear these row:
myCommand.Parameters.Add(new System.Data.OracleClient.OracleParameter("Photo", System.Data.OracleClient.OracleType.Blob));
myCommand.Parameters["Photo"].Value = m_Img;
and modified StoreProcedure: clear parameter Photo, it run good
Why? Help me, Please.
Thank you very much.

Can you post your table structure?

Similar Messages

  • Compatibility of Informatica 7.1.2 and DAC 7.8.4 with Oracle 11g database

    Hi All,
    We have situation where we would like to upgrade the Oracle DB from 10g to 11g with the below OBIEE components.
    Component Current Version
    Platform Oracle Business Intelligence 10.1.3.4.1
    Application Siebel Analytics 7.8.5
    Infromatica Informatica 7.1.2
    Database Oracle Data base 10.2.0.3
    DAC Siebel Analytics 7.8.5
    Please let us know whether we have an option to oracle db upgrade prior to platform upgrade. If any body is sucessfull, please share the pros and cons of the sames like loading issues/performance issues/etc.
    Thanks
    BP

    As per the document http://docs.oracle.com/cd/E10415_01/doc/bi.1013/e10417.pdf
    Can go for oracle database 11g.
    Pls mark if helps

  • Saving and loading images (png) on the iPhone / iPad locally

    Hi,
    you might find this helpful..
    Just tested how to save and load images, png in this case, locally on the i-Devices.
    In addition with a SharedObject it could be used as an image cache.
    Make sure you have the adobe.images.PNG encoder
    https://github.com/mikechambers/as3corelib/blob/master/src/com/adobe/images/PNGEncoder.as
    Not really tested, no error handling, just as a start.
    Let me know, what you think...
    Aaaaah and if somebody has any clue about this:
    http://forums.adobe.com/thread/793584?tstart=0
    would be great
    Cheers Peter
        import flash.display.Bitmap
         import flash.display.BitmapData
        import flash.display.Loader   
        import flash.display.LoaderInfo
        import flash.events.*
        import flash.filesystem.File
        import flash.filesystem.FileMode
        import flash.filesystem.FileStream
        import flash.utils.ByteArray;
        import com.adobe.images.PNGEncoder;
    private function savePic(){
        var bmp =  // Your Bitmap to save
        savePicToFile(bmp, "test.png")
    private function loadPic(){
         readPicFromFile("test.png")
    private function savePicToFile(bmp:Bitmap, fname:String){
           var ba:ByteArray = PNGEncoder.encode(bmp.bitmapData);
            var imagefile:File = File.applicationStorageDirectory;
            imagefile = imagefile.resolvePath(fname);
            var fileStream = new FileStream();
            fileStream.open(imagefile, FileMode.WRITE);
            fileStream.writeBytes(ba);
             trace("saved imagefile:"+imagefile.url)
    private function readPicFromFile(fname:String){
            var imagefile:File = File.applicationStorageDirectory;
            imagefile = imagefile.resolvePath(fname);
            trace("read imagefile:"+imagefile.url)
            var ba:ByteArray = new ByteArray();
            var fileStream = new FileStream();
            fileStream.open(imagefile, FileMode.READ);
            fileStream.readBytes(ba);
            var loader:Loader = new Loader();
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onPicRead)
            loader.loadBytes(ba);   
    private function onPicRead(e:Event){
        trace("onPicRead")
         var bmp:Bitmap = Bitmap(e.target.content)
         // Do something with it

    Are the movies transferred to your iPhone via the iTunes sync/transfer process but don't play on your iPhone?
    Copied from this link.
    http://www.apple.com/iphone/specs.html
    Video formats supported: H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.
    What are you using for the conversion? Does whatever you are using for the conversion include an iPod or iPhone compatible setting for the conversion?
    iTunes includes a create iPod or iPhone version for a video in your iTunes library. Select the video and at the menu bar, go to Advanced and select Create iPod or iPhone version. This will duplicate the video in your iTunes library. Select this version for transfer to your iPhone to see if this makes any difference.

  • Before image and after image is not updating correctly with 2LIS_04_P_ARBPL

    Hello BW gurus
    I am facing problem with the posting date extraction from the extractor 2lis_04_p_arbpl. I am getting incorrect before image and after image. Please let me know how to solve this problem.
    Thanks and regards
    kiran.

    Hi,
    It is difficult to check this in the Source System and there is no direct method. I can give you a workaround which we did analysed for some of delta datasources.
    Steps to be followed sequentiall once the step is successful:
    1. Create a Production order or something.. Note down the number.
    2. Check the datasource whether you get the same Production Order as delta
    3. Now do whatever confirmation etc . for the same Production Order
    4. Check the datasource (RSA3) and see wat it extracts.. might be multiple records..
          In that case just see the sequence of records.. and the changes each record has brought in.. hope this way we can simulate the delta datasource realtime..
    And if you find the sequence or somthin is correct and in BW is not updating properly then it is our fault to dig and find out further.. If the issues is at the RSA3 itself, then u can raise an OSS Message as a Bug.
    Hope it helps.
    Regards,
    Chathia.

  • Placing OS image and Data image on right partition

    Hi ,
    We are facing issue in placing right image at the right partition. 
    We have OS image and data image. We are formatting and partitioning HDD as 40% (OSDisk) and remaining 100% as (Data). Both paritioons are active and selected as primary. 
    Then in installing operating system step, i have selected place image based on variable 'OSDisk'
    and Data image is also slected to be placed based on variable 'Data'.
    TS finishes without any issues but when i login to the machine i can see that OSDisk has become 'D' Drive and Data Drive has become 'C' so it shows C drive with label as 'Data' and D drive is label as 'OSDisk'
    I want to place OS on C drive and Data drive should always be as 'D' drive.
    I have tried another method and this time i tried to install OS as 'place based on stored variable i.e. OSDisk but install data image as next available partition but with this placement OS never boot after restart and TS eventually fails. 
    My aim is to make 'C' drive contain OS image and 'D' Drive to containg  data image content and not the otherway around as it is happening with current test. 
    Any suggestions will be highly appreciated. Thanks. 
    Regards,

    Hi ,
    Yes it is Config manager 2012 R2 but image is actually not source media install.wim. It a custom captured image through MDT2013. Image has 1 partition only.
    However I tried the above solution but drive letters are still not coming correct for OSDisk and Data Drive. Data is coming on 'C' drive and OSDisk is coming at 'D' drive.
    Regards,

  • Before image and after image concept of ODS

    Hi Gurus,
    Could anybody help me in understanding the concept of " Before image and after image in ODS"
    Kindly forward me if any good docs are available on my email ID: [email protected]
    With regards,
    wrushali

    check this link for after image.
    Re: regarding ODS
    and before image is snapshot of the data before a change took place
    after image is snapshot of the data after change.
    these are used for delta update.
    Hope it helps.
    Regards

  • After Image and Before image in case of Generic extraction

    Hi Guru's,
    Please explain the concept of the After image and before image wrt to Generic extraction.

    hi,
       consider a record in data source suppose it is return to ods
    now
    materid matnme  quantiy
    1         tiles         20
    another recored with the same charcteridti arrive in bw
    i.e
    1         tiles          78.
    now rhe reault is
    1 tiles     78(it is new image) for new image
    1 tiles     20(before image)
    1 tiles   +58(additive image) for additive image.

  • LO Cookpit: what is "Before Image" and "After Image" related to Delta ?

    Someone mentions "Before Image" and "After Image" which is related to Delta method in source systems.  Someone know what they mean?
    Thanks

    Before Image and After Image are different Record modes present.
    Before Image :
    Lets assume the data present in the Cube and ODS is
    Doc No --Mat Type --- QTY
    120 -
    M01----
    10
    Now let assume that the data has changes and the quatity has to be changed from 10 to 8.This can be done in different way depending on if we are using a Cube or ODS.
    If its a Infocube . i.e it is additive so we can send the before image and the after image together
    Eg:
    Doc No -
    MAT type -
    QTY
    120--M01--
    -10
    120--M01--
    8
    If the Data Source sends both the before image and the after image, this combination can be loaded in any cube or ODS target. For ODS targets, if Overwrite setting is made, then only the after image(the last one) will make it to the Activation queue table of the ODS. If the ODS is set to Addition then both before and after image are needed to make a correct load to the target.

  • I seem to have lost my original images and unwanted images have moved into my library. I couldn't access lightroom 3 as usual and was provided a default option which I clicked. I ely heavily on lightroom and have spent countless hours fixing images, ple.

    Hi, I seem to have lost my original images and unwanted images have moved into my library. I couldn't access lightroom as I would normally and was provided with a default option which I clicked. This all occured while I was trying to free up space on my computer while viewing saved images on my hard drive, which are linked up directly to a photoshop elements program. Please tell me this can be fixed.....

    Hi there,
    I don't believe I did move or delete my catalogue. Where can I look for my catalog file. Why does my Lightroon now contain more images and ones I don't want on it, without my physically importing them?
    Thanks
    Pablo

  • How to stop on the last image and that image remains on the screen?

    hello,
    how to stop on the last image and that image remains on the screen?
    thanks
    Yves

    Two ways are;
    split the clip with the razor tool at the point you want the image to freeze, r-click and select a Frame Hold option,
    or
    position the play-head at the end of the clip you want freezing and export a still frame. Re-import it and put it in your sequence.

  • What is diff B/W dalta image and reverse image

    What is diff B/W dalta image and reverse image
    Edited by: Philip Eller on Jun 3, 2008 8:44 AM
    Edited by: Philip Eller on Jun 17, 2008 9:18 AM*

    Please post your question to the BW forum.

  • I am trying to use photomerge compose.  I open one standard jpeg image and one image that is my business logo in a png format.  When I select the png image, to extract the logo from it, it appears as all white and will not allow me to select the logo from

    I am trying to use photomerge compose.  I open one standard jpeg image and one image that is my business logo in a png format.  When I select the png image, to extract the logo from it, it appears as all white and will not allow me to select the logo from it.  It has worked in the past but I downloaded the update today and photomerge will not work correctly.  Any ideas?

    hedger,
    How do you expect anyone to help when we don't know a darned thing about the file, abut your setup, exact version of Photoshop and your OS, machine specs, etc.?
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Unable to connect Forms and Report with Oracle 9i database

    Dear All
    Please help
    I have received the following message when i connect Developer 10G Report builder with oracle 9i database.
    scott/tiger@z
    REP-0501:Unable to connect to the specified database ORA-12154:TNS could not resolve service name.
    I have written the following text in tnsnames.ora file.
    # TNSNAMES.ORA Network Configuration File: E:\ora_10g\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    z =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = zkhan-dfml)(PORT = 1521))
    (CONNECT_DATA =
    (SID = dba)
    One more thing that i need to mention,I have also installed Oracle Report 6i and its connecting well.I have installed Oracle database in my own computer.
    Regards

    [email protected] wrote:
    Thanks for the reply,Now my tnsnames.ora file is look like this.
    z =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = zkhan-dfml)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = dba)
    but still facing the same error ,one more thing that i need to mention, I have 3 Oracle home.details are:
    for Oracle database 9i
    for report builder 6i
    for Developer 10G
    Kindly advise.Yes, you definately needed to mention that. That suggests you also have 3 $ORACLE_HOME/network/admin directories, each with its own tnsnames.ora file. So you need to make sure you are hitting the correct one. I'd pick one to be the controlling one and set the TNS_ADMIN enviornment variable to point to it.

  • I am trying to connect oracle develper suit form with oracle 10g database

    i am trying to connect oracle develper suit form with oracle 10g database
    but when i pass username and password
    this message apperars
    ORA-12560:TNS:protocol adapter error
    every time even i try to connect Report or Designer each time same problem
    making no connection .
    can any body help can help me to reslove this prblem
    Arshad khan

    Duplicate thread:
    Re: connection problem

  • Problem Connecting Developer Suite Form 9 with Oracle 9i Database

    Hi,
    I have a problem to connect Developer Suite Release 2 forms 9 with Oracle 9i database release 1. I have done net8 easy configuration but no success. The error is ORA-12514 TNS: Listener could not resolve SERVICE_NAME given in connect descriptor. I am not using any application server. Can any one help me to solve this problem.
    Thanks in Advance
    Nasir Ali Mughal

    Configure the net configuration for both 9idb and 9ids in the same way. Make sure the TNSlisner is started.

Maybe you are looking for

  • Importing slideshow from iMovie 09

    I don't know if it is a brain cramp or what, but I am having difficulty importing my slideshow from iMovie 09 into iDVD. I carry out all of the steps when in iMovie and then when I go to the media tab, my movie is not there. Can someone please help??

  • Home directory is full

    I am suddenly getting an error message when I try to open Mail what can I do? After restarting my computer I got the following error message: Mail cannot update your mailboxes because your home is full. You must free up space in your home folder befo

  • Payment Proposal Layout?

    Hi Guru's, When we run the proposal we are using the standard display variant. We want to edit this to add the invoice #, doc #, invoice date and total? Is there any way I can do this ? Also if I change this for one company code will i be changing th

  • Can Ipad1(WIFI) originally support FaceTime at all? After sync IOS 5, the Face Time is no found either. Please kindly help.

    I am using IPAD1 the WIFI one. I have not noticed if it supports Face Time funtion. After sync IOS5, I want to try Face Time with Iphone 4, but could not find out this funtion from my WIFI Ipad1. Please kindly help if the Ipad 1 is possible for Face

  • The reload tabs function from the last session on startup is missing.

    Firefox would reload all the open tabs that were open when I last closed Firefox. Now this does not happen. Is it just that I have not found the way to save tab groups (Panorama)? May I change a setting or is this function not available any more? It