ADOQuery and Blob slowness

From: Scott Elgram (SElgram_at_verifpoint.com)
Date: 10/27/04

  • Next message: Del M: "Re: ADOQuery and Blob slowness"
    Date: Wed, 27 Oct 2004 10:15:07 -0700
    
    

    Hello,
        I have a process that inserts a record into a database that contains a
    BLOB field. Currently I am using the following code to do this;

    ----------------------Begin Code------------------------
          Blob := TFileStream.Create(ImageFile, fmOpenRead);
            With ADOQuery2 do
              begin
                SQL.Text := 'SELECT TOP 1 * FROM [TABLE] ;';
                Open;
                Insert;
                FieldByName('PlanID').Value := PlanID;
                FieldByName('ProvID').Value := ProvID;
                FieldByName('VerifBy').Value := VerifBy;
                FieldByName('VerifDate').Value := VerifDate;
                FieldByName('Type').Value := DocType;
                (FieldByName('Image') AS TBlobField).loadfromStream(Blob);
                FieldByName('PacketIndexID').Value := PktID;
                if Derog <> '' then
                  FieldByName('Derog_type').Value := Derog;
                Post;
                Close;
              end;
            Blob.Free;
    ----------------------End Code------------------------

        The project is a rewrite of a VB program and in VB this process seems to
    go a lot faster. Can anyone tell me why this seems to go so much slower and
    does anyone know a faster way to insert this data?

    Thanks,

    -- 
    -Scott Elgram
    

  • Next message: Del M: "Re: ADOQuery and Blob slowness"

    Relevant Pages

    • Re: Use sharepoint as normal file server
      ... Not only is it slower, it takes more disk space. ... Restoring an entire database to a different server so that you can ... > the most common performance bugaboo about remote access of sharepoint ...
      (microsoft.public.sharepoint.windowsservices)
    • Re: Office 2008 starts very slow
      ... I rebuilt the Entourage database and the size went from 1.8 GB down to ... My assessment is the slower ... launch time is the price of progress. ... I just have to get used to the slow startup. ...
      (microsoft.public.mac.office)
    • Re: general load balancing issues
      ... > of the local installation are often relevant. ... If there are frequent state ... going to a backend database can make things slower. ... using dsitributed database system called mnesia. ...
      (freebsd-hackers)
    • Re: Problem retrieving images from Access 2003 Binary Large Object
      ... order to store the JPG files in my database without the overhead? ... >> and you will avoid the conversion & extra storage and will be able to work with the data directly in ASP ... >>>If I connect to the Access database from an ASP page and read the BLOB field ... >>>returned when reading the BLOB field using MS Access, ...
      (microsoft.public.access.modulesdaovba)
    • Re: i18ned Character Set in DBMS and tables
      ... nationalities/character sets (like the immigrant database at Ellis ... these data differ, don't they?) ... For me, a developer, "way slower" means anything that would run more ... large DBMS-based software development ...
      (comp.lang.java.programmer)