SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: MySQL to Oracle

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Location
    Kuching, Sarawak
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL to Oracle

    Hi there,

    I am new to oracle and wish to have some helps here. Currently, I have query which convert the image file into the binary format before store into MySQL database.
    Now, I need the image file to store into the oracle. I just want to make sure/ensure the differences of the query.

    Here the query for MySQL:

    Code:
    strInsertQuery += formatObj.getHexForFile(formatObj.getDecodeBase64(arrVal.get(i).toString())) + ", ";
    If I want to convert the image into the binary file into oracle db, can I use the same code as above or what changes I need to make
    to get it work in oracle.

    Thanks in advance

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    The code you posted as nothing to do with MySQL. So yes it would work with Oracle. But you don't need to do that, you can store binary data as is. Use the blob for the column type.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,079
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    As long as the column you are storing to isn't truncating the data, it will be fine. The logic you have posted is from a server side language, it really doesnt matter where you're storing the result and retrieving it from.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •