I'm having problems with adding a BLOB to my database

I get a error (
An unhandled exception of type 'Oracle.DataAccess.Client.OracleException' occurred in system.data.dll
Additional information: System error. )
on the last line of the code
I'm coding it is Visual Basic .net
can some one tell me what is causing the error or can any one till me how to find out more on the error message.
table schema
CREATE TABLE "CWMS"."LOCAL_FILE_BLOBS" (
     "CWMS_ID_UC" VARCHAR2(16) NOT NULL,
     "FILE_TYPE" VARCHAR2(16) NOT NULL ,
     "DISPLAY_ORDER" NUMBER(10, 2) NOT NULL,
     "FILE_TEXT_DES" VARCHAR2(255) NOT NULL,
     "ORG_FILE_NAME" VARCHAR2(255) NOT NULL,
     "DATE_TIME" DATE,
     "FILE_DATA" BLOB,
PRIMARY KEY("CWMS_ID_UC", "FILE_TYPE","DISPLAY_ORDER","ORG_FILE_NAME"))
TABLESPACE "FILEBLOB"
source code
Public Function UpdateBlob(ByVal CWMS_ID As String, ByVal ORG_FILE_NAME As String, ByVal DISPLAY_ORDER As Integer, ByVal DATE_TIME As DateTime, ByVal fs As System.IO.Stream)
'To fill DataSet and update datasource
Dim printmediaAdapter As Oracle.DataAccess.Client.OracleDataAdapter
'In-memory cache of data
Dim printmediaDataSet As DataSet
''Data Row contained in Data Table
Dim printmediaRow As DataRow
''For automatically generating commands to make changes to database through DataSet
Dim printmediaCmdBldr As Oracle.DataAccess.Client.OracleCommandBuilder
printmediaAdapter = New Oracle.DataAccess.Client.OracleDataAdapter("SELECT CWMS_ID_UC, DISPLAY_ORDER, FILE_TYPE, ORG_FILE_NAME, FILE_DATA FROM LOCAL_FILE_BLOBS", conn)
'Instantiate a DataSet object
printmediaDataSet = New DataSet("LOCAL_FILE_BLOBS")
'Step 2.'     
'AddWithKey sets the Primary Key information to complete the
'schema information
printmediaAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
'Configures the schema to match with Data Source
printmediaAdapter.FillSchema(printmediaDataSet, SchemaType.Source, "LOCAL_FILE_BLOBS")
'Step 3.'
'In this case 'OracleCommandBuilder' automatically generates
''SelectCommand'
printmediaCmdBldr = New Oracle.DataAccess.Client.OracleCommandBuilder(printmediaAdapter)
'Step 4.'
'Adapter fills the DataSet with 'PrintMedia' data
printmediaAdapter.Fill(printmediaDataSet, "LOCAL_FILE_BLOBS")
'Step 5.'
'Create a new row in the DataTable contained in the DataSet
printmediaRow = printmediaDataSet.Tables("LOCAL_FILE_BLOBS").NewRow()
'part of Step 7.'
'Assigning the value of advertisement text
printmediaRow("DISPLAY_ORDER") = DISPLAY_ORDER
Dim temp As String
temp = ORG_FILE_NAME
temp = StrReverse(temp)
temp = StrReverse(temp.Substring(0, temp.IndexOf(".")))
printmediaRow("CWMS_ID_UC") = CWMS_ID
printmediaRow("FILE_TYPE") = temp
printmediaRow("ORG_FILE_NAME") = ORG_FILE_NAME
'If image is added
'Step 6.'
'providing read access to the file chosen using the 'Browse' button
'Create a byte array of file stream length
Dim adImageData(fs.Length) As Byte
'Read block of bytes from stream into the byte array
fs.Read(adImageData, 0, System.Convert.ToInt32(fs.Length))
'Close the File Stream
fs.Close()
printmediaRow("FILE_DATA") = adImageData
'Step 8.'
'Adding the 'printmediaRow' to the DataSet
printmediaDataSet.Tables("LOCAL_FILE_BLOBS").Rows.Add(printmediaRow)
'Step 9.'
'Update the database table 'PrintMedia' with new printmedia rows
printmediaAdapter.Update(printmediaDataSet, "LOCAL_FILE_BLOBS")
End Function

Have you try the same code on a different clean machine (system.data.dll failing, it might be .net framework mismatch)?
Where exactly is the code failing (which line is throwing the exception?)
It is only failing with a blob?
Arnold

Similar Messages

  • Having problem with adding and reading dates to/from database !!!

    Hi
    I am new in J2ME
    I am trying to code a simple software.
    My problem is with dates.
    I have a datefield on my menu and the user will choose the date from here. By default, datefield shows todays date. But when I try to write that date to database using rms, date value transforms to java.util.Date@acfdb0fe.
    As I read from tutorials this is common problem of date class, so I tried to use calendar class.
    But with Calendar class I cannot let user to choose date from screen like DateField. datefield dowsn't work with calendar.
    later, I will use that date for sorting records
    Summary : I need a sample code that read date from screen (preferably with datefield), write it to recordstore. and then read it from recordstore asnd write to screen.
    I searching internet for a sample code through days.
    Please help me
    Thanks

    Hi,
    The best i would suggest is instead of storing the date as 19 Jan 2004 or something like this better store the date in milliseconds.
    DateField df = new DateField();
    Date d = df.getDate();
    long ms = d.getTime();
    store the value of ms in RMS. This is the commonly used way to store date in RMS for j2me.
    You can get back date using
    Date d = new Date(ms);
    DateField df = new DateField();
    df.setDate(d);
    Prabhu.

  • Having problems with adding other computers to WRT54G

    Okay, I've got my new WRT54G set up and it's running fine for my desktop, but when I go to add another computer to the network it says that a wired connection is needed. I've checked and double checked that the network cable is connected correctly to the computer and to the router (via port #1), but it's still telling me that it isn't connected... Am I doing something wrong and how can I fix this problem? Please help.
    Message Edited by Roonie-Roe on 01-05-2008 07:11 PM

    Hi...I think you are trying to add a wireless computer to network.
    For that don't use the disk or wizard. Just right click on wireless network connection icon in right hand bottom corner(task bar) of computer and click view available wireless network.
    Here you will find a list of available wireless networks, just select your network and get connected to it. It might ask for key, if it is a secured network. Which you might have noted down while initial setup.

  • Help Needed!  I have created a 13 Min Slide Show in iPhoto (iMac Mavericks) but am having problem with adding music.

    I created a 13 min Slide Show in iPhoto but have a question on adding music.  I would like to add music clips that are set to change at the beginning of certian slides so that there is a varity of music during the show rather than a continuous theme clip.  I know you can add multiple clips but can you pin them to change at a particular point in the program?  Right now the music clips just run to their time limit and the next one starts.  Isn't there a way to edit them the way it can be done in iMovie? Its frustrating to be able to create a nice slide show and not be able to manage the music background.  Any suggestions would be greatly appreciated.  Thanks.

    No, you don't have that fine grained control of the soundtrack in iPhoto. It's designed for a quick job, not a complex one.
    Alternatives to iPhoto's slideshow include:
    iMovie is on every Mac sold.
    Others, in order of price:
    PhotoPresenter  $29
    PhotoToMovie  $49.95
    PulpMotion  $129
    FotoMagico $29 (Home version) ($149 Pro version, which includes PhotoPresenter)
    Final Cut Pro X $299
    It's difficult to compare these apps. They have differences in capability - some are driven off templates. some aren't. Some have a wider variety of transitions. Others will have excellent audio controls. It's worth checking them out to see what meets your needs. However, there is no doubt that Final Cut Pro X is the most capable app of them all. You get what you pay for.

  • HT4314 I m having problem with adding one more Id to my same Game Center account!!   It says "email Id unavailable " but this is mine Id only? And can u also tell me what it means?

    Hi plz tell answer of my question. I m not being able to add my friends due to this problem!

    Luxury, Julie! I can't even get past the “Nickname” window. I put in a nickname and press the “Continue” button. Another pool-table-felt-green window appears, empty except for the spinning pinwheel (“doing something…”) in the middle. After a couple of hours mesmerized by this wonderful phenomenon, I figure I didn't want to see what "Game Center" is, anyway.

  • Friend is haveing problems with adding me back on ...

    He says to me that he is not getting any invites from me and he accidently removed me from his contact's and i think its android he uses, his version are 4.6.0.42007 .

    In the <enclosure> tag, which iTunes uses to locate the media file, you have a period at the end, after the 'mp3' - this invalidates the URL and produces a 'file not found' error, hence the 'no episodes' complaint.

  • Having problem with extra DDR2 for P45 Neo2

    Having problem with adding more DDR2 to my P45 Neo2. I currently have 2x hyperx 2gb ram installed, but I would like to take it up to 8gb. I had purchased another set, installed and pc wouldn't load. I installed these into another pc and they worked fine. What am I missing? I have tried googling but cannot find the solution to my question.According to MSI it will take DDR2 800/1066/1200. It does not mention what module name it takes eg pc 5300, which I'm quite sure are the ones installed. I have just updated the bios to the most recent should this help?

    Guessing you have all RAM related settings as "auto"?
    Does the PC work with your new set only?
    You may need to set the RAM timings&voltage manually in BIOS to common factors
    that are valid for both your new and old RAM kits.
    These settings you will do with your old kit in place, save in BIOS, exit and power down.
    Insert the new kit in addition, see if it POSTS. May take a few tests to succeed.
    CPU-Z program can help to figure some of the parameters.

  • Anyone having problems with the Abc app no loading since it has been added?

    Anyone having problems with the Abc app no loading since it has been added?

    Hi Popalotofstyle,
    Thanks for using Apple Support Communities.  It may be worth trying a restart of your Apple TV to see if that allows the ABC app to load:
    Apple TV: How to restart your Apple TV
    http://support.apple.com/kb/ht3180
    Cheers,
    - Ari

  • I am having problems with my music collection, after burning all of my music to the computer I organized it into folders and placed it in the iTunes Folder. Starting on a new computer now. I can get my music from old computer?

    I am having problems with my music collection, after burning all of my music to the computer I organized it into folders and placed it in the iTunes Folder. As of now i realize this was a mistake. Starting on a new computer now. I cant get my music to transfer from the itunes folder on the old computer? I keep getting error "Can't Read from the source file or disk." Whenever I got to folder properties its always checked read only. But when i play the song it works just fine. Im sure this is just because I added music into itunes folder but is there anyway to fix it?

    WMA files are 'window media audio' files, which is a Microsoft format. If you want to add them to your iTunes library on your Mac then you will need to convert them into a compatible format first. If you still have your windows machine then iTunes for Windows can convert them from WMA to MP3 format : https://discussions.apple.com/message/24158701#24158701
    Or try a search for, for example, 'convert wma to mp3' to find programs to convert them.

  • I am having problems with my itunes, when plugging my iphone or ipod to the laptop - i can see iphone/ipod in the top right corner of itunes but when i click this to the see what is on theis iphone/ipod the option is no longer there, this was working

    I am having problems with the new itunes set up ........
    when i plug in my iphone or ipod touch it shows in the top right hand corner of itunes
    BUT when i click on the shown iphone/ipod the icon its no longer there, i was useing this fine yesterday and it was showing yesterday what is on this ipod and would allow me to add/remove music, but now this option is no longer availlable - i have added a couple of albums to my itunes i can listen to the music from the laptop but cannot sync the ipods to trancefer these albums to the handheld devices -
    i have been trying to sort this all day with no luck not sure if there is a problems with itunes or is it something i am doing ????
    HELP !!!!!!!!!!!!

    BOB we need you urgently
    Perhaps Bob will see this thread, he is the professor in these cases.
    You do not use a WEP password but wpa/wpa2 on router and equipment.
    All equipment connects to WiFi, but for your iPad.
    Even with all other equipment WiFi off, you cannot connect your iPad.
    Your iPad connects to other WiFi nets correctly.
    All resets etc done on iPad and Router.
    Still I am not sure it is your router for sure, frustrating...
    I want to test 2 other things:
    1. in your iPad, set everything OFF in Settings/Cellular, turn off/then/on your WiFi, and see whether it will still not connect...
    2. If that does not do it: disconnect the router as well as the modem from the power, for 15 seconds, then reconnect the modem, let it fully start, then reconnect the routet let it fully start, turn of your WiFi in iPad, then on, and see whether it will connect.

  • If you're having problems with USB ports, read on...

    i'm reading that alot of people on here are having problems with their front (or top) usb on their cases not working with their k7n2 boards.  i have come across the correct solution to this problem in one of the posts (after having solved the problem on my own), however noone has posted the solution by itself on this forum so everyone can easily see it.
    The trick is to make sure that pin 10 (at least on a K7n2 delta-L), the pin labeled USBOC (USB Open Connection), is wired to NOTHING.  If the connector to your front usb ports is fused into one giant connector and it HAS a wire that will connect to this pin (labeled GND2 or Shield or something), CUT THAT WIRE.  Pin 10 on JUSB2 (at least on a K7n2 delta-L) must be OPEN.  If this pin IS connected to something (even if it is only GND), the motherboard will think something is connected to this usb port and you will get many unknown devices listed in your windows device manager and the rest of your usb ports may or may not work.
    As a general rule of thumb, if a pin on a motherboard is labeled OC for "Open Connection" and you wire something to it, you're asking for trouble.
    If you cannot understand this you should not be attempting to wire a motherboard in the first place. 
    Here is a picture to go along with this discussion.  If you cannot see this picture, I am sorry for it has probably been removed from the place I posted it online as I cannot attach pictures physically to this post.  If someone here has a way to permanently host this picture and post it to this thread permanently, that would be wonderful.
    In summary: all usb ports/headers have only four pins associated with it (VCC, USB+, USB-, GND).  If the connector (whether it's one big connector or individual sockets) to your front/top usb port has 5 sockets, don't connect the 5th socket to anything.  That goes for any case/motherboard combination.  This is what i'm talking about above.  I have no idea why motherboard and case manufacturers have a 5th pin involved in any way on either the pin or socket side.  It is not used for usb.
    EDIT:  I just noticed this has already been discussed in the trouble shooting guide in the above sticky post.  oh well, now we have a pretty picture to go along with it (i hope).

    :-D)Hello guys,
    as promised I come back here to give the results of my tests... and I have to say that you saved my day (even if I had to open back 60 secured cases).
    So the solution was the right one, when I unplugged the "ground" end of the front USB connector cable from the USBOC pin, those connectors finally worked as expected with USB 2.0 compliant devices.
    So thank you really much for this very usefull information !
    And even if maybe it's not only MSI's fault, I still believe that more information on those connectors in the user's manual would be really usefull (who knows what USBOC means except a few people and who could imagine that pluggin on it a "ground" cable would make it unserviceable ??). And who ever saw a user's manual bundled with a case ?? it's pretty unusual  
    Hope that someone at MSI will read that and take it into consideration, not for me (because now I'm aware) but for the thousands other consumers that will feel a little bit "annoyed" with that issue. I don't think that adding one line about it in user's manuals would be so much expensive  
    But I'm quite lucky myself... being able to understand and write english (even if I still have some progress to do  ) gave me the possibility to find the solution... but a lot of my french fellows can't do that... and there's no french forum here... How can they do ? They rely on user's manual
    Best regards,
    Nicolas

  • Trying to get my fcp project to burn to dvd at the highest quality? Ive used compressor and then tried to put it in dvdsp put its not working. I am having problems with the audio or when i burn it , i cant play the dvd? any help would be appreciated

    Ive used compressor and then tried to put it in dvdsp put its not working. I am having problems with the audio or when i burn it , i cant play the dvd? any help would be appreciated

    I suspect you are attempting to burn an HD DVD, which will not play on a DVD player...
    But if you provide more details such as the settings you are applying in Compressor, then we would be able to provide you more accurate information.
    How are you adding the files to Compressor?
    In FCP, what are your footage properties (command-9) and sequence settings (command-0)

  • I am still having problems with my music videos freezing (all purchased from iTunes) since the update.  Have restarted, rebooted etc. and it is worse than before.  Help!  Spent a lot of money on these and they won't play properly.

    I am still having problems with my music videos freezing (all purchased on iTunes) since the update.  The first day of the update, no problems...played 6 hours of music videos and no freezing.  Today...every single video froze!!! So frustrating!  I rebooted, restarted, powered down and no help.   I would appreciate any suggestions.  Thanks.

    I don't know how to do this without using a mouse point.
    This may help, http://www.computerhope.com/issues/ch000542.htm
    As for question #2, you call tell how iTunes is sorting songs by the up or down arrow next to a header name.
    Even the original order that the songs were entered or date added or last played can be sorted.
    Much easier with a mouse or touch pad.

  • Having Problems with my mail Program

    I am having Problems with my email account. I am still on OS snow Leopard and just recently ordered the Newer Mac mini with Lion.
    I use to have the Mobile Me account, since I haven't switched over to iCloud yet, I still have the Mobile Me account set up in my email account and still have the Mobile Me idisk on my desktop.I also have my other local isp email account in my mail program. Just now I am getting a email problem from my other email account, I am getting my email but I get a pop up window that request my password from my other email account and at the top of the side bar where the mail icons are on the left side there is a "A" with a Circle around it next to my mail icon or sometimes a " ~ " (Tilda)  next to the mail icon. I tried to contact my ISP to ask them if they were having propblems at their end but they didn't get back to me, they usually do get back to me.
    Since I have the Mobile Me email account un active, am wondering if the mobile me account is effecting my other active email? am also wondering if the computer still thinks that the Mobile me email account is still active and is trying to get mail through my other active email account?
    Does someone have any soloutions for me? or can someone Please help me? cause this is very fustrating cause that Password wondow keeps popping up and I can not turn it off from popping up unless I completly quit the mail program but if I restart it or reopen it up, it starts all over again.
    Please someone Help me if you know what is going on here?
    Thank You,
    Mrs. Trisha Foster

    you might try to look for the VACUUM command (do a google search on: mail.app vacuum).
    The ~/Library/Mail/Envelope Index file is a SQLite database. it does slow down as things are added and deleted. You can also find people who suggest deleting (or moving this file to the desktop or somewhere else) after quitting MAIL and then restarting MAIL... it will tell you it needs to import all your mail... it SHOULD find all the mail and rebuild the "Envelope Index" file. You can try it.
    link here http://www.macosxhints.com/article.php?story=2006013009291731
    Message was edited by: keith daniel1

  • Having problems with OS 4.5 on 8300

    Hello, I own a 8100 and a 8300. I have installed the OS 4.5 on both of them. 8100 is working perfectly fine with the new features such as viewing youtube but the 8300 does not. 8300 is also having problems with finding and downloading applications from the App World.
    Any help and comments are appreciated.
    Thanks

    Do you have a BlackBerry Data Plan enabled on your account with your carrier or mobile provider?
    If not, call your carrier and inquire about having the BlackBerry Data Plan added to your account.
    Good luck.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

Maybe you are looking for