Solved

Standalone .EXE with Delphi 1.0?

Posted on 1997-06-25
3
231 Views
Last Modified: 2010-05-18
I am writing an application in Delphi 1.0 that doesn't
use any database access.

However, when I send the EXE file to someone else, they
get the error "unable to initialise Borland Database
Engine".

Now, the application doesn't use any external resources,
so it should be possible to distribute it as a single
EXE file, shouldn't it?

Someone has already suggested that I am referencing a
unit that tries to initialise the BDE. However, I can't
find an obvious candidate. The list of units references
by the program are as follows:

  SysUtils, WinTypes, WinProcs, Messages, Classes,
  Graphics, Controls, Forms, Dialogs, Menus,
  ExtCtrls, StdCtrls, Buttons;

So, how do I get Delphi to stop trying to initialise BDE?

Thanks,

James
0
Comment
Question by:shingen
3 Comments
 
LVL 1

Expert Comment

by:flisakow
ID: 1337804
Yes, it is possible to distribute as a standalone EXE. I have Delphi games I distribute this way from my web site.

None of the units mentioned should be a problem, I use them all the time.  "DB", or "DBTables" might cause this.

I suggest you open the actual project file, and check to make sure you are only compiling the code you think you are.  If that doesn't lead anywhere, check the .DSK file to see if a file containing some database stuff is open, or considered to be in the project but not being used.

Shaun
http://www.kagi.com/flisakow/
0
 
LVL 1

Accepted Solution

by:
millerw earned 100 total points
ID: 1337805
If you place ANY database component on the form, the database system is installed in the program and ARE NOT REMOVED WHEN THEY ARE TAKEN OUT IN DELPHI 1.0.  The same thing happened to me in college why i accidentally put a TTable on a form and deleted it.  The program would not run after this and the way I fixed it was pretty much to cut all of my components that I wanted into a new form saved the form and started a new project.  

I think if you just create a new project, remove the generic form that comes up, add all of your form files back to the new project your problem will be fixed.  Sometimes with problems like this, starting over with a fresh project file is just as good (and less time consuming) than trying to find that single line of code that is causing your problems.  

If the problem persists, check all uses statements in every file your project contains (after the interface AND implementation in each unit file) to make sure all database units are removed.

That should fix the problem and make the EXE the only file you have to distribute.

Good Luck,
Scott
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1337806
Bought This Question.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now