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

  • SEARCH
  • Home
  • 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

Related Questions

We have a Delphi 2006 application that drives a MS SQL Server database. We
Simple problem. I'm working on a Delphi 2007/WIN32 application which now uses MS Access
I have written an application in Delphi 2010 that imports data from one database
PROBLEM: I'm trying access binary records that were created in Borland Delphi and stored
I have a legacy desktop accounting application developed using Delphi 5 & Paradox, which
We have a Delphi 7 application that runs as an ISAPI extension in IIS6.
I'm working on a Delphi/WIN32 application that uses an SQL Server database as back-end,
I developed a Document Managment System (DMS) as a Delphi client server application that
I have a Delphi + SQL Server (2k or 2005 supported) app that is
Delphi XE2, so I guess that is Indy 10(?). One server, 10 clients. I

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.