Best data type in mySQL for an Image

What would be the preferred data type in mySQL to store an image
(jpeg or png)?
I would think BLOB would serve this purpose best.
Who is currently doing this and what data type are you using?
Regards,
Scott

Hi GIlly,
well, we all agreed that the best field type in which to store the image
would me a blob. I still have not succeeded in storing an actual image
in  MySQL database (see my post of July 4th).
UbuntuPenguin has been giving me some ideas but  I can't get
an image written to the DB. The trick is to encode the image into
a byteArray and I have code for that and for the decode of the
image when reading from the database.
If you take the encoded byteArray and copy it by hand into a blob
field in MySQL every thing is fine. I just can't get an HTTP service
call to do it.
Regards,
Scott

Similar Messages

  • What is the best data type for wallet application?

    Hi Friends..
    I want to know what is the best data type for wallet application..
    Assume that, i want to the Total of money saved digitally in Applet Wallet..
    And then if there's any transaction the Total of money which saved digitally in Applet Wallet would be Subtracted or Added depends on how much money that spent or saved..
    Which one is the best implementation of these scenarios :
    1. I save the User ID and Total of money in the Java Card, and then if there's any transactions, it would be added or subtracted directly and then saved again in the Java Card
    2. Or.. I save the User ID in the Java Card whereas Total of money in the Database, and then if there's any transactions, the ID would be read from the Card, and then select the Database based on that ID, and then Add or Subtract the money depends on how much money spent in the Transaction
    Please help me regarding this
    Thanks in advance

    Hi,
    Personally I would choose to store the total amount stored on the card. You could use two shorts (short[] perhaps) to store an integer (add more shorts to increase precision) and simply handle overflow your self. You could even look into using a third party library (or class) that treats a byte array as a big integer etc. There were some posts recently on floating point arithmetic that could be helpful for you since you will probably want to use decimals and JC does not natively support floats.
    Cheers,
    Shane

  • ERROR OGG-01148 programming error, data type not supported for column

    I am getting following error when I put null in insert statement
    2011-03-31 18:30:45 ERROR OGG-01148 programming error, data type not supported for column TXID in table advoss.tblaudittrail.
    I am replicating MySQL 5.5.9 to Oracle 11g rel2 via goldengate 11

    I am able to diagnose what is cuasing the problem
    unsigned flag was the culprit of this error
    I am able to insert null after removing unsigned flag.
    thank you very much for your kind support

  • Best data type to represent a file size

    Hi All!
    I have to create a table which holds details abou the files which process on a system and maintain the file name process, size of the file in byts, full path location the file is stores etc.
    My question is what would be the best data type for a file size, currently the system proceess 4 GB files but I do not know whether this will expand so I need a data type which will be compatible for any size ther will be no decimal points involved in this.
    I hope my question is clear.
    Thank you in advance.
    Regards, Shaamil.

    user8706423 wrote:
    Hi All!
    I have to create a table which holds details abou the files which process on a system and maintain the file name process, size of the file in byts, full path location the file is stores etc.
    My question is what would be the best data type for a file size, currently the system proceess 4 GB files but I do not know whether this will expand so I need a data type which will be compatible for any size ther will be no decimal points involved in this.
    I hope my question is clear.
    Thank you in advance.
    Regards, Shaamil.Simple as Oracle did in v$datafile's BYTES field:
    SQL> desc v$datafile
    Name                                      Null?    Type
    FILE#                                              NUMBER
    CREATION_CHANGE#                                   NUMBER
    CREATION_TIME                                      DATE
    TS#                                                NUMBER
    RFILE#                                             NUMBER
    STATUS                                             VARCHAR2(7)
    ENABLED                                            VARCHAR2(10)
    CHECKPOINT_CHANGE#                                 NUMBER
    CHECKPOINT_TIME                                    DATE
    UNRECOVERABLE_CHANGE#                              NUMBER
    UNRECOVERABLE_TIME                                 DATE
    LAST_CHANGE#                                       NUMBER
    LAST_TIME                                          DATE
    OFFLINE_CHANGE#                                    NUMBER
    ONLINE_CHANGE#                                     NUMBER
    ONLINE_TIME                                        DATE
    BYTES                                              NUMBER
    BLOCKS                                             NUMBER
    CREATE_BYTES                                       NUMBER
    BLOCK_SIZE                                         NUMBER
    NAME                                               VARCHAR2(513)
    PLUGGED_IN                                         NUMBER
    BLOCK1_OFFSET                                      NUMBER
    AUX_NAME                                           VARCHAR2(513)
    FIRST_NONLOGGED_SCN                                NUMBER
    FIRST_NONLOGGED_TIME                               DATE
    FOREIGN_DBID                                       NUMBER
    FOREIGN_CREATION_CHANGE#                           NUMBER
    FOREIGN_CREATION_TIME                              DATE
    PLUGGED_READONLY                                   VARCHAR2(3)
    PLUGIN_CHANGE#                                     NUMBER
    PLUGIN_RESETLOGS_CHANGE#                           NUMBER
    PLUGIN_RESETLOGS_TIME                              DATE

  • What is the best data type to store XML string

    Hello all,
    If we want to store a XML string in oracle database table for some other program use what is the best data type that we can use in the table to store this XML string..
    Is it VARCHAR? or can we use BLOB type
    Anybody to help please
    Message was edited by:
    user483578

    If your XML data will not be larger than 4000 characters then use VARCHAR2 else CLOB. I don't see a need to use BLOB (unless your XML data contains binary information).

  • What data type is used for storing password,

    What data type is used for storing pass word in oracle db, i mean if user inputs some thing from forms it should be in Encrypted form in db, please any help??
    Thank you
    Hina

    Data type is VARCHAR2:
    SQL> desc dba_users;
    Name                                      Null?    Type
    USERNAME                                  NOT NULL VARCHAR2(30)
    USER_ID                                   NOT NULL NUMBER
    PASSWORD                                           VARCHAR2(30)
    ACCOUNT_STATUS                            NOT NULL VARCHAR2(32)
    LOCK_DATE                                          DATE
    EXPIRY_DATE                                        DATE
    DEFAULT_TABLESPACE                        NOT NULL VARCHAR2(30)
    TEMPORARY_TABLESPACE                      NOT NULL VARCHAR2(30)
    CREATED                                   NOT NULL DATE
    PROFILE                                   NOT NULL VARCHAR2(30)
    INITIAL_RSRC_CONSUMER_GROUP                        VARCHAR2(30)
    EXTERNAL_NAME                                      VARCHAR2(4000)
    PASSWORD_VERSIONS                                  VARCHAR2(8)
    EDITIONS_ENABLED                                   VARCHAR2(1)
    AUTHENTICATION_TYPE                                VARCHAR2(8)You can use SQL function ORA_HASH to hash password: http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions124.htm#SQLRF06313.

  • Data Type to use for Fiscal Year Period selection screen parameter

    I need to accept user input in the format
    YYYY.PP
    where YYYY is the Fiscal year and PP is the Period.
    Is there a data type ( element / domain ) for such a field ?

    date element you can use SPMON
    or
    parameter : p_spmon like MCS0-SPMON.
    regards
    shiba dutta

  • How to use same Data Type and Length for two fields

    How to use same data type and length for two fields when using 'FOR ALL ENTRIES IN' in a select statement? For instance the select queries are :
    SELECT bukrs gjahr belnr lifnr budat bldat zlspr dmbtr waers shkzg
    FROM bsik
    INTO TABLE it_bsik
    WHERE bukrs = p_bukrs
    AND lifnr IN s_lifnr.
    IF it_bsik IS NOT INITIAL.
    SELECT belnr gjahr awkey awtyp
    FROM bkpf
    INTO TABLE it_bkpf
    FOR ALL ENTRIES IN it_bsik
    WHERE belnr = it_bsik-belnr
    AND gjahr = it_bsik-gjahr.
    IF it_bkpf IS NOT INITIAL.
    SELECT belnr gjahr lifnr xblnr
    FROM rbkp
    INTO TABLE it_rbkp
    FOR ALL ENTRIES IN it_bkpf
    WHERE belnr = it_bkpf-awkey+0(10)
    AND gjahr = it_bkpf-awkey+10(4).
    ENDIF.
    ENDIF.
    Here it gives an error in the 3rd select query that 'When you use the addition "FOR ALL ENTRIES IN itab", the fields "GJAHR" and "IT_BKPF2-AWKEY+10(4)" must have the same type and the same length.'
    Kindly clarify.

    Hi Saurabh,
    Please see the example code that I have developed for you. It will help you solve the problem.
    REPORT ZTEST_3 .
    tables : BKPF.
    data : begin of it_bkpf occurs 1,
             belnr type RE_BELNR,
             awkey type awkey,
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf.
    data : begin of it_bkpf1 occurs 1,
             belnr type RE_BELNR,
             awkey type gjahr,              " change the data type
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf1.
    data : begin of it_rbkp occurs 1,
             belnr type BELNR_D,
             gjahr type gjahr,
             lifnr type LIFRE,
             xblnr type XBLNR,
           end of it_rbkp.
    select belnr
           awkey
           awtyp
           gjahr
           from bkpf
           into table it_bkpf
           where BUKRS = 'TELH'.
    loop at it_bkpf.
    it_bkpf1-belnr = it_bkpf-belnr.
    it_bkpf1-awkey = it_bkpf-awkey+10(4).           "Here only append the required length.
    it_bkpf1-awtyp = it_bkpf-awtyp.
    it_bkpf1-gjahr = it_bkpf-gjahr.
    append it_bkpf1.
    clear it_bkpf1.
    endloop.
    select  belnr
            gjahr
            lifnr
            xblnr
            from RBKP
            into table it_rbkp
            for all entries in it_bkpf1
            where belnr = it_bkpf1-belnr
    This is just an example. Change the fields according to your requirement.
    Regards
    Abhii
    Edited by: Abhii on Mar 9, 2011 9:08 AM

  • TestStand Data Type Enumeration Explained for Array of column_information

    I'm sure it's in the documentation somewhere but I can't find TestStand Data Type Enumeration Explained for Array of column_information.
    data_type 1, 2, 3 ect.
    What do they represent?
    Thnaks,
    -SS
    Attachments:
    TestStand.PNG ‏20 KB

    If you are referring to the Database Connectivity Toolkit, then the definitions for the data types are as follows:
    Item
    Value
    String
    0
    Long (I32)
    1
    Single (SGL)
    2
    Double (DBL)
    3
    Date/Time
    4
    Binary
    5
    Jared A.
    Applications Engineer
    National Instruments

  • Mixed Data Type Table Control for Data Entry

    Hi Guys --
    I'm attempting to do error-checked data entry,
    My data is mixed: path, boolean, and numeric.  The natural organization is an array of clusters.  For instance, the cluster element would look like "path, boolean, numeric, numeric"  and I would have many rows of this data cluster.  To further complicate things I have to dynamically define the number of numeric elements in the cluster (tricky already) and also dynamically define the length of the array.
    I find the table control to be ideal to handle the dynamic nature of the data for editing.  I can easily use scroll bars to navigate to the appropriate part of the data.  I can delete rows and columns etc.
    On the other hand, the table can only handle string data.  I find that doing data checking and type conversion on the table elements to be extremely cumbersome. 
    I think what I'm looking for is a Table Control with ability to handle controls as elements.  From what I've read in this list and personally experienced, that functionality doesn't exist.
    Does LV have in-built functionality that I'm overlooking to resolve this problem?  Is there a third-party library that would do the job?
    Thanks,
    John

    Hi Ben --
    I think perhaps that I wasn't clear in my description. 
    As I pointed out, my data is organized naturally as an Array of Clusters.  More descriptively, my data looks like spreadsheet data; some text, some numbers.  I need to add rows and columns dynamically.  I need to be able to resize column widths dynamically... and while the program is executing.
    The Table Control does all of this.  The intuitive way that the Table Control permits a user to enter data is also good for my user.  The Array of Cluster data looks like spreadsheet data and a Table looks close enough to a spreadsheet.  A Table permits one to insert and delete rows, resize columns widths, and scroll around.
    I don't see that I get these features with an Array of Clusters Control.
    The issue with the Table Control is the lack of in-built data types, so I spend an inordinate amount of time doing type-conversion and range-checking. 
    At this point I'm pretty much convinced that LV doesn't have the in-built capability that I'm looking for. 
    I am curious if there are any LV libraries or Active-X controls somewhere that would implement the functionality that I require?

  • Data Type mismatch in for all entries.

    Dear Friends,
    I have a problem...please advice me for that..... I m using code as following...actually the isse is when ever i am using
        WHERE docno = it_j_1iexchdr-rdoc (along with FOR ALL ENTRIES IN) the error is occured data type mismatch.
    becoz DOCNO is field of(j_1iexchdr) and RDOC is a character field of same table...but i want to get reference data..so i need to compare both field...u can undersdand my requirement in following coding.. Error line is denoted by (<----
      DATA: BEGIN OF it_j_1iexchdr OCCURS 0,
            bukrs LIKE j_1iexchdr-bukrs,               " Company Code.
            exnum LIKE j_1iexchdr-exnum,               " Excise Invoice No.
            exdat LIKE j_1iexchdr-exdat,               " Excise Invoice Dt.
            kunag LIKE j_1iexchdr-kunag,               " Sold-to-party
            kunwe LIKE j_1iexchdr-kunwe,               " Ship-to-party
            rdoc  LIKE j_1iexchdr-rdoc,
           rdoc  TYPE j_1iexchdr-docno,
            addldata1 LIKE j_1iexchdr-addldata1,       " Reason for Issueing Excise Invoice
            exbed LIKE j_1iexchdr-exbed,               " Excise Duty
            ecs   LIKE j_1iexchdr-ecs,                          " 2%Cess
            exaddtax1 LIKE j_1iexchdr-exaddtax1,       " Shec
            trntyp LIKE j_1iexchdr-trntyp,                   " OTHR
            END OF it_j_1iexchdr.
      DATA: wa_j_1iexchdr LIKE it_j_1iexchdr.
      DATA: BEGIN OF it_j_1iexchdr1 OCCURS 0,
            trntyp LIKE j_1iexchdr-trntyp,
           docno LIKE j_1iexchdr-rdoc,
            rdoc LIKE j_1iexchdr-rdoc,
            END OF it_j_1iexchdr1.
      DATA: wa_j_1iexchdr1 LIKE it_j_1iexchdr1.
    SELECT bukrs exnum exdat kunag kunwe rdoc
             addldata1 exbed ecs exaddtax1 trntyp
      FROM j_1iexchdr
      INTO CORRESPONDING FIELDS OF TABLE it_j_1iexchdr
      WHERE  bukrs IN v_bukrs
      AND   exdat IN v_exdat
      AND   trntyp = 'OTHR'.
    IF it_j_1iexchdr[] IS NOT INITIAL.
         SELECT trntyp docno rdoc
        FROM  j_1iexchdr
        INTO CORRESPONDING FIELDS OF table it_j_1iexchdr1
        FOR ALL ENTRIES IN it_j_1iexchdr
        WHERE docno = it_j_1iexchdr-rdoc  <----
    I
        AND   trntyp = 'DLFC'.
      ENDIF.
    Pl help me as soon as possible...
    Thanks & Regards,
    Swapnika Panse

    Hi,
    In table j_1iexchdr, there are two fields
    RDOC     J_1IRDOC1     CHAR     10      Reference Document 1
    DOCNO     J_1IDOCNO     NUMC     10      Internal Excise Document Number
    RDOC is of character type and DOCNO is of numeric type.
    Your declaration for fields is :
    docno LIKE j_1iexchdr-rdoc,
    rdoc LIKE j_1iexchdr-rdoc,
    And in the select query you are trying to fetch docno which is of type j_1iexchdr-rdoc. SO, change your declaration from
    docno LIKE j_1iexchdr-rdoc,
    to
    docno LIKE j_1iexchdr-docno,
    This should solve your problem.
    Thanks,
    Archana

  • Best Data rate and format for Big Screen Playback

    I am a video producer supplying content for a tradeshow display consisting of 18 flat screens oriented vertically, 8 over 8. Very heavy duty Windows playback machine, with 3 graphics cards, 1 for each set of 6 monitors. The total pixel size is 3240x 1280 px. We have produced a number of full screen and smaller movies that the interactive programmer is trying to intergrate into a Flash program where some videos will play full screen, and others in smaller windows (those were produced in 1920x1080). All videos were mastered at the specified pixel count, square pixels, progressive, and output in Pro Res 422, 44.1K audio. Flash is being used to create the interface, and I am transcoding to .F4V at lower bit rates like 4, 6, and 9 Mbps. They are having trouble playing these movies back smoothly. We have done similar projects in the past with Director without issue. Of course they are blaming the video, I am offering to encode in any format at any data rate they suggest. Can anyone suggest a direction here?

    Are you trying to burn a standard DVD or are you trying to put a QuickTime .mov file on DVD media?
    A standard DVD doesn't worry about file size (only the duration).
    A "data" DVD is limited to the type of media used. A single layer DVD is about 3.7 GB's.
    In order to make a data DVD you need to keep the data rate low enough to not exceed the DVD media playback abilities. They can't handle the higher rates found in many of the preset options.
    You can avoid all of these headaches by telling the viewer to "copy" the .mov file from the DVD to their Desktop. Then nearly any of the presets option will work.
    H.264 is a great video codec and the "automatic" preset should work just fine. Use "multi-pass" for best quality (takes a very long time). Remove the check mark for "Audio" since your file has none. Leave it checked and you waste file size because a silent audio track would be added.

  • What compression type to use for disk image files

    Hello all
    I was wondering if a more experienced user than me could give a recommendation as to which compression format I should use to compress an image I made of my / partition. I used dd to make the image file.
    For me, (de)compression time is more important than compression ratio (size), but I'm of course looking for a good blend of both
    Thanks for any advice

    If you have a multicore processor, use pigz instead of gzip etc. Start with this app and only after you're not happy with it, look for one that's faster / compresses better.
    BTW, do you have a lot of incompressible data in there? Movies, pics, music and already compressed files won't compress any more.
    Last edited by karol (2011-01-29 16:16:03)

  • Best file type and size for logo?

    I should know this but I am going to ask anyway. I am have a local graphic artist create a new logo for me. It needs to be keyed in my show opening, segues, and close. The program is shot and edited in 720p but sometimes 1080p. The larger the better for scaling down? I am always lost when it come to this topic.
    Thanks in advance.
    Cheers.
    Tom

    As Russ said, it is better to scale down than up.
    Let me add this: if possible, the original file for the logo should use vectorial graphics. This way it won't have a fixed size, and can resized without any loss of quality. This should not be a problem if, for example, the logo is created in Illustrator (formats like eps, pdf, svg can contain vector data). Vector files are also usually smaller in size, although that is probably not a bi consideration here.
    Then you can make rasterized versions at different sizes, as needed. You'll probably use a png file in the video, as png supports alpha channel (transparency).

  • What is the data type for the Data Dashboard XY Graph?

    Hey all,
    I am playing with the new Data Dashboard (!!) on my iPad 2 and am having trouble setting up the shared variables that host data to the XY Graph.
    On my PC, in my Project (inside of a variable library) I have set up shared variables for all of the other controls/indicators available in the app; They all work great. However, I have not been able to identify the data type that is for the XY Graph in Data Dashboard. Of course, inside LabVIEW, I use a cluster of 2 arrays; this is not an available data type that I can select while creating a new variable on the hosting side. I have even gone so far as to create a custom control from my XYGraph in LabVIEW and then creating the data type "From Custom Control..." with no success.
    What gives? Am I missing something obvious? Thanks for the help!!
    Tom
    Solved!
    Go to Solution.

    Great question, Aerogoob.
    The XY graph can be bound to a 1d array of "points", where each point is a cluster of two numerics (X and Y). To create a shared variable of this type, you can set the data type to "From Custom Control..." in the shared variable properties dialog. Of course, first you'll have to build the custom control of the correct type: array of cluster of two numerics.
    If any of that doesn't make sense, please post back and we can walk you through it in more detail.
    Also, just for completeness, the chart indicator can be bound to a scalar numeric or to an array of numerics. The graph indicator can only be bound to an array of numerics.

Maybe you are looking for

  • How can I mirror ipad on my hdtv using apple tv?

    I recently bought ipad 2 (32 GB wifi).  We already have apple tv.  I heard that I can miror ipad onto our hdtv using apple tv.  Is that correct?  What else do I need? How do I do it? Thanks in advance.

  • Wrong stage in Approval Procedure

    Hi All. Recently, we've upgrade our SBO (2007A) to SP01, PL08 and then we noticed a strage problem regarding Approval Procedures. Our Approval Procedure Template (for POs) has 2 stages as below: First stage - st1 Defined Approvals - 2 Required - 1 Se

  • Unusable safari after Mountain Lion 10.8.2 upgrade

    Hi, After the last Mountain Lion update (10.8.2) using Safari is not like before to me. Every single time i wake up my Macbook Pro and run safari, pages I try to open just cant open normally, loading tooks for 2-5 min then page opens, after 5 min it

  • File was view only, won't save to PDF - log: OffendingCommand: text (Framemaker 11)

    I have been printing a book successfully for weeks now, and today did an edit to one chapter in the book. Now when I save the book as PDF, I get this in the log: %%[ Error: undefined; OffendingCommand: Text ]%% Stack: /Body /T -mark- %%[ Flushing: re

  • X-Fi Xtreme Gamer Mic Driver Is

    Ok, I've just recently downloaded the newest driver for my sound card. I instantly had a problem with it. It gave me a rolling blue screen of death upon reboot and kept rolling into reboots. I fixed this by going into safe mode and uninstalling and t