How can I insert an image(JPG) into a SQL database?

I have written an application to perform some tests in the lab.  After gathering the data I store it into a SQL Server.  I successfully managed to export all my raw numbers and calculations to the DB.  However I have not been able to export a screenshot of the Front panel.  I can write the screenshot to a JPG file just fine.  The problem is putting the image (binary data) into the DB.
So from what work I've managed to do, two questions come to mind:
1)  Is there a way to compress the screenshot, using standard JPG compression, without actually writing out to a file.  ie:  Just have a binary stream of the compressed image that I can write to the SQL database.
2)  Even if I don't use compression, I can't write any kind of data that appears as an image.  What kind of data do I need to be writing from LabView to store it properly in an 'image' or 'binary' type field in a SQL database?  I am not looking for answer "binary data."  Nor do I want the answer that is stated in the Help file for the DB Connectivity Toolkit(type - Data Cluster).  What I need is to know what kind of conversions I need to do on the image data that comes out of the FP.GetScaledImage.
I am using LabView 8.0 and have the Database connectivity toolkit.  We are running SQL Server 2000 and 2005.

I also hit this limit.  In the end I just wrote the JPGs to disk, and stored the file path in the DB.  Not the ideal solution, I know.
I'm trying to remember now, exactly what the problem was.  You're right to say the image data type should handle up to 2GB.  I think in the end, it was an issue of the LabView toolkit not playing well with newer versions of SQL Server, which have the image type.  Re-reading the error though, it sounds like it might be an issue with the ODBC driver.  FYI, 8KB used to be the max size for the largest types in SQL Server (I think binary in 2000).  I suspect this limit was coded into the driver or LabView, and can't handle the newer, larger types.
That being said, the LabView DB toolkit was either written poorly or written a long time ago.  It has issues with generating SQL queries that have the proper quotes.  For example, if your column names have spaces in them, the toolkit will be unable to generate a valid query, without some modification of the toolkit *.vi's.  Images in a database is not a new concept and not new to me.  I've never used a language where it was more complicated or difficult to get working.  Unless you absolutely have to, I'd work out a way to just store the JPGs to disk, with the path in the DB.  Spending too much time on this defeats the purpose of using LabView.
If NI decides to update the DB toolkit, then it might be worth giving it a try again.
In case any NI people are reading this, this is a not so subtle hint that you need to update the DB toolkit to support modern DB features.  Especially, if NI is charging $1000 for it.

Similar Messages

  • How can I map an image (JPEG) from the SQL database image string

    I saved the image into SQL database, see attachment (SaveImage2SQLDB.rar), while I have some trouble to retrieve the image. I also attached the vi which I used to convert the string to image. The string already has a value I obtained from the database. Can anyone tell me the reason why it didn't work.
    Thanks in advance.
    Jane
    LabVIEW 2012, VDM 2012
    Attachments:
    convertstringtoimage.vi ‏78 KB
    SaveImage2SQLDB.zip ‏27 KB

    Hi Jane,
    What exactly isn't happening correctly?  The conversion or the retrieval? 
    This discussion forum may be of some use: http://forums.ni.com/t5/LabVIEW/image-from-compressed-string/m-p/2207894
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Can I insert the image file into PDF file  in Adobe X Standard ?

    can I insert the image file into PDF file in Adobe X Standard ?

    http://matt.coneybeare.me/how-to-make-an-html-signature-in-apple-mail-for-maveri cks-os-x-10-dot-9/

  • I have powerpoint for Mac on my imac.  I can't seem to get the active text box function to work like it did on my PC.  How can I insert an active textbox into a presentation that will allow me to type while presenting?

    I have powerpoint for Mac on my imac.  I can't seem to get the active text box function to work like it did on my PC.  How can I insert an active textbox into a presentation that will allow me to type while presenting?

    I've gotten a little further on this. The dynamic select is
    working fine. It's the "a href" code that isn't. I'm wondering if
    someone can look at this line and tell me if it's okay to build the
    query string this way. The storeid comes through fine but I'm still
    not getting the employeeid value to pass. Here's line that's not
    working:
    td><a href="registerStoreCust.php?storeid=<?php echo
    $row_storeRS['storeid']; echo "&employeeid="; echo
    $_GET['employeeLM']; ?>">Register
    Customer</a></td>

  • How can I insert an existing ApDiv into a tab in the Spry Tabbed Panel?

    I have 5 of them all containing nested Apdiv within nested ApDivs (a long storie ) that I would like to insert into 5 tabs in the Spry Tabbed Panel.
    Please help.

    "Hi Gramp,I realize I have made hard work for myself but I really don't know any better. I also realize now that taking on this project may have been a mistake :-)I taught myself how to use the design side of Dream Weaver. These five ApDivs were created in the content area of the spry tool and it worked fine. (yes a lot of work though)For the first time I looked at the code side. I wanted to try to bring a peace of code from another page for something unrelated and when it didn't work I took it out and without noticing, deleting a line from the Spry tool.Of course like a classic newbe I was working without a backup copy so here I am. Loosing hours of tedious work and on the verve of tears :-)I do have some  questions though.  My APDiv
      What does "apDiv1" stands for and what does "My APDiv" stands for?Is the only thing I have to do is changing this line for my five ApDivs and paste it in the appropriate places in the code? Thanks again,Gilaad
    Date: Sat, 16 Jun 2012 20:39:07 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I insert an existing ApDiv into a tab in the Spry Tabbed Panel? 
        Re: How can I insert an existing ApDiv into a tab in the Spry Tabbed Panel? 
        created by Altruistic Gramps in Spry Framework for Ajax - View the full discussion 
    You have really made hard work for yourself by using APDiv's. I suppose it can be done, but I would not. To answer your question, I have create an example as per#apDiv1
    My APDiv
    Content 2
    Tab 1
    Gramps 
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4498679#4498679
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4498679#4498679. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Spry Framework for Ajax by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How can I insert a completed file into another PDF file I am developing?

    How can I insert a completed file into another PDF file I am developing?

    Please refer : http://acrobatusers.com/tutorials/how-to-insert-a-pdf-into-a-pdf

  • How can I insert and image in all PDFs printed via BW?

    How can I insert and image in all PDFs printed via BW?
    We want to remove the image from all Web Templates and insert it in the header of PDF printouts.
    <removed by moderator>!
    Tom
    Edited by: Siegfried Szameitat on Dec 3, 2008 2:57 PM

    Select clip in timeline. Open effects. At the bottom, search for flip. This should find the "Flipped" effect. Drag that effect cover the clip.

  • How can I insert an image into an mov file in iMovie while keeping the background music?

    I have a short MOV file movie clip that has background music but one of the images (it's a static element with text) is incorrect. How can I replace the image but keep the backgroup the same? Also what size would the image need to be to properly fit?
    Thank you!

    Hi hyue,
    Thanks for visiting Apple Support Communities.
    If you would like to add an image to a project in iMovie for iOS, see this article for helpful steps:
    iMovie for iOS (iPad): Add photos to a project
    http://support.apple.com/kb/PH3171
    All the best,
    Jeremy

  • How can I inserting file's line into a oracle table in physycal order

    How can I insert the file's line into a oracle table in the same physycal order that they exists in the file ?
    I am using "SQL to FILE" km to performing file load into Oracle table, but the order which the records are insered into the oracle table doesn't match with the order of file's lines
    How can I guarantee the same file's physycal order in the oracle table( target ) and file( source ) ?
    Is it possible throught ODI ?
    Thanks,
    Luciana

    Hi,
    although I understand why use "File to Oracle( SQLLDR )" KM, I haven't the guarantee that in the agent's machine the Oracle Client installed and because when I openned the others projects I saw that anyone in my company use this KM( "File to Oracle( SQLLDR )" )
    Tha's why I ask for anyone lead me whith the modification of the previous post in the "uLKM File to SQL", specifing the km step e where put the RECNUM pseudo column
    This is fundamental for my ODI project
    When I try to alter the "Create Work Table" and "Load Data" step of my "uLKM File to SQL" km, the execution returned me the error below:
    =====================> Create Work Table Step
    create table <@= vWorkTable @>
         C1_LINHA_ARQ     VARCHAR2(500) NULL, RECNUM NUMBER(10)
    =====================> Load Data Step
    select     LINHA_ARQ     C1_LINHA_ARQ
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=ARQ_INSS2SNP$CRLOAD_FILE=/arquivos_odi/ccrs/in/#CCRS_CAD_INSS.vpNOME_ARQUIVOSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=09SNP$CRFILE_SEP_LINE=0D0ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=LINHA_ARQSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=500SNP$CRPRECISION=500SNP$CR$$SNPS_END_KEY*/
    insert into ODI_RUN_CONV.C$_0TMP_ODI_INSS_DADOS_ARQ
         C1_LINHA_ARQ, RECNUM
    values
         :C1_LINHA_ARQ, RECNUM
    =====================
    984 : 42000 : java.sql.BatchUpdateException: ORA-00984: column not allowed here
    984 : 42000 : java.sql.SQLSyntaxErrorException: ORA-00984: column not allowed here
    java.sql.BatchUpdateException: ORA-00984: column not allowed here
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:629)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9409)
         at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)
         at com.sunopsis.sql.SnpsQuery.executeBatch(Unknown Source)
    ...Thanks again gyus,
    Luciana
    Edited by: 933810 on 31/05/2012 06:04
    Edited by: 933810 on 31/05/2012 06:07
    Edited by: 933810 on 31/05/2012 06:14

  • How can I insert an image into a cell in Numbers for iPad?

    Hi,
    is there any way to insert an image inside a cell using Numbers for iPad? I tried doing it on desktop version and it works, then I shared it through iwork.com and downloaded into my iPad and it's showing fine on the iPad ( although there's no way to edit or change the image inside the cell ) but when I try to do the same task on iPad itself, the image always comes floating even if I place the cursor inside a cell before inserting.
    any idea how to do it or if it's even possible?
    thanks.
    John

    Images can be added to cells only as "image fill." Cell fill is an attribute of the cell, not content of the cell. Only cell content can be retrieved by a formula or by copying the content of the cell.
    Copying the cell will also copy its format, including the image fill, but I've found no way to extract the image from the cell.
    Regards,
    Barry

  • How can I insert a image into a BLOB column in a table?

    I am using forms6i against a 10gR2 database and I have one table with a BLOB column and I try to insert a image into this column. I get ORA-01461 error.
    The curious case is that in another table with a BLOB column it works very fine.
    What happens with the first table? How can I avoid the error?
    Thanks in advance.

    Hi hyue,
    Thanks for visiting Apple Support Communities.
    If you would like to add an image to a project in iMovie for iOS, see this article for helpful steps:
    iMovie for iOS (iPad): Add photos to a project
    http://support.apple.com/kb/PH3171
    All the best,
    Jeremy

  • How can I insert an image at the original resolution into a PDF using Acrobat Pro XI

    Got an image created in Photoshop at 300DPI 2480 pixels wide by xx high.  Saved as a TIFF.
    When I insert that image in my PDF (A4 210mm x 297mm) using Acrobat Pro XI via "Content Editing->Add Image" it appears smaller than the page width of the PDF, and I must manually resize the inserted image by dragging with my mouse.  
    Documentation says the image is inserted at the original image resolution, but it doesn't seem to be the case.
    Also tried creating another image in Photoshop using 210mm width @ 300 DPI (instead of 2480 pixels @ 300DPI), got the same results.
    Can anyone help?  Cheers.

    You should maybe take a step back. Nobody composes pages in Acrobat.

  • How can I insert jpeg images into a PDF's Header and Footer?

    International Clients send me a lot of pdf price lists (hundreds).  I want to be able to easily add our letterhead header and footer jpegs to my Acrobat one time so that I can then have them easily placed and printed on each new original document I receive when I (re)print them as a new (compressed) pdf.   This will streamline my work so that when I send them out and they start circulating among Buyers they can clearly see that we are the US contact for XYZ Client?
    Thank you.

    If you add a background or water mark, as opposed to a footer/header, you can specify an image to use.
    You can also use JavaScript to add a custom toolbar button or menu item so that you can easily add the images to a documant, or even in a batch process, using a variety of methods. Post again if you'd like more information.

  • How can I Export the Image file into Oracle Table

    <tt>
    Hi Folks,
    I have one requirement with me, but i can't able to find the solution for that, so kindly any one give a suggestion for my requirement.
    Let me explain my requirement in detail.. I have one table called SIGN this table contain customer signature image as well as the image of the customer. The SIGN have the following columns
    </tt>
       CREATE TABLE SIGN
      ID                    VARCHAR2(50 BYTE)            NOT NULL,   "This column containing the Customer ID"
      IMAGE_C_FLAG          CHAR(1 BYTE)                 NOT NULL,   "This column containing the whether ID belong to Signature or Photo"
      IMAGE                 BLOB,                        NOT NULL,  "This Column Containing the Image "
      ENTERED_C_BY          VARCHAR2(10 BYTE)
    The SIGN having the following values
    ID                                                 C I IMAGE
    23900033                                           Y S  (BLOB)
    23900034                                           Y S  (BLOB)
    23900035                                           Y S  (BLOB)
    23900036                                           Y S  (BLOB)
    23900042                                           Y S  (BLOB)<tt>
    I want to export those Image from Table into my machine local folder with the extension of .JPEG(C:\IMAGE)
    How can i do that in oracle... please kindly any one give the solution for this..
    This is my Oracle server version
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod
    PL/SQL Release 10.1.0.2.0 - Production
    CORE 10.1.0.2.0 Production
    TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
    NLSRTL Version 10.1.0.2.0 - Production
    Thanks in Advance
    Arun
    </tt>

    Hi Arun,
    Please view the below links. Hope these helps you as there are also of similar discussion.
    Insert Picture (image) using oracle forms
    Insert Picture (image) using oracle forms
    insert image to atable in forms builder
    Re: insert image to atable in forms builder
    Thanks,
    Balaji K.

  • How can I turn an image/graphic into a simple, low detail image for T-shirt printing (see examples)?

    So, I do know my Photoshop, but this is just killing me! I've messed with the filters and can get an allright image, but there has to be an easier way that I'm just not thinking of. Can you tell me how to convert an image into a low detail image like the ones below?

    You create selections based on color range.
    Mylenium

Maybe you are looking for

  • HT2474 Please Remove The Dock or at least Give me The possibility Of totally Hiding it, thanks

    Is apple going to completely remove the dock or at least give us the possibility of removing it? I am thinking about an interface like Xubuntu, it is quite strange that Snow Leopard does not give us the same flexibility to achieve such a clean OS int

  • K7n2 with a serial ata addin card

    I have a k7n2 without the serial ata controller, athlon 2400, 512 mb ddr 333, and a winfast geforce 2 mx 64.  my question is will i be able to boot off of an addin serial ata card and a western digital raptor 36 gig hard drive.  also will the bios be

  • Regarding Interaction Records Creation

    Hi All, I am implementing the BADI CRM_IC_IARECORD  and write the code in BEFORE_IR_CREATE. Here i am going to suppress the creation of interaction record if user has not pressed save button. Could you please anybody suggest me here how to get whethe

  • Nokia 5530 switches off when making/receiving call

    Hello , i have strange problem with nokia 5530. Its just switches off when making/recieving a call. I read nokia discussion of Europe and USA. there are number users who have same problems i have it now. I've gone to nokia care and hope they can give

  • When is the new photo app coming out

    when is the new photo app coming out? I have iPhoto, will it be wise to quit using it?