Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 878125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:43:26+00:00 2026-05-15T11:43:26+00:00

Delphi 7 SQLSERVER 2000 I am having a problem with a legacy application that

  • 0

Delphi 7
SQLSERVER 2000

I am having a problem with a legacy application that I am unable to recompile, because when i do I lose the ability to retrieve documents from a text field they are stored in and write to disk, I only get the first 8 bytes. I have a much larger application, but a really simple app is recreating the issue.

Code is below. Connection string used to connect is.

Provider=SQLOLEDB.1;Password=toflidium;Persist Security Info=True;User ID=sa;Initial Catalog=DocManager;Data Source=DELPHIBOX;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=DELPHIBOX;Use Encryption for Data=False;Tag with column collation when possible=False

The entire code for the test case

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, ADODB, DB, StdCtrls, DBCtrls;

type
TForm1 = class(TForm)
ADOConnection1: TADOConnection;
ADOQuery1: TADOQuery;
Edit1: TEdit;
Button1: TButton;
DBText1: TDBText;
DBText2: TDBText;
DBText3: TDBText;
DataSource1: TDataSource;
ADOTable1: TADOTable;
DataSource2: TDataSource;
DBGrid1: TDBGrid;
ADOQuery1DocumentDataID: TAutoIncField;
ADOQuery1VersionID: TIntegerField;
ADOQuery1DocName: TStringField;
ADOQuery1ActualDoc: TMemoField;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  sql : string;
begin

  sql := 'Select Top 1 * from tblDocumentData where VersionID = ' + ADOTable1.FieldByName('VersionID').asstring ;
  ADOQuery1.Close;
  ADOQuery1.SQL.Text := sql;

  ADOQuery1.Open;   

  TBlobField(ADOQuery1.FieldByName('ActualDoc')).SaveToFile('c:\temp\temp\myfile' 
                    +  ADOTable1.FieldByName('VersionID').asstring + '.doc');

end;

end.

This is the entire file writen to dis

ÐÏࡱá

I should recieve an entire 20 – 50K word Document.

I rebuilt an entire machine to see if something had been set wrong on my dev machine and I get the same issue on rebuilding. if I just build and try against live database I have same issue, but the older version (now about 4 years old) works fine.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:43:27+00:00Added an answer on May 15, 2026 at 11:43 am

    I found the problem. I must have moved machines after the previous update and not installed Update 1 for Delphi 7.

    Installed the update and it fixed the problem – should have been uptodate before I went looking for other problems.

    Hopefully this answer might help some others.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 496k
  • Answers 496k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You would only need to escape an ampersand in your… May 16, 2026 at 11:36 am
  • Editorial Team
    Editorial Team added an answer Select Case When FileName Like '.jpg%' Or FileName Like '.gif%'… May 16, 2026 at 11:36 am
  • Editorial Team
    Editorial Team added an answer You cannot. You need to subscribe with the proper service… May 16, 2026 at 11:36 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

We have a Delphi 7 application that runs as an ISAPI extension in IIS6.
We have a Delphi 2006 application that drives a MS SQL Server database. We
Any advice on how to migrate an existing Delphi 7 business application to .NET
I have a Client/Server application written Delphi. Essentially all the application is doing is
I have an ADOQuery that inserts a record to SQL Server 2005 table that
I have derived my own component from TAdoQuery in Delphi. I have overridden the
What needs to be done to enable pooling in a Delphi 7 app? My
We have in the process of upgrading our application to full Unicode comptibility as
My Delphi 6 program need to place an image on each row of my
I am using Delphi 7 but I have trialed the Delphi 2005 - 2010

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.