My project is on Delphi 2009, Paradox DB and Google Maps. The code is OK and the time right now is to build the project. This is the first time to do it. As I know there are two programs to create the setup file; InstallShield or InstallAware. Via InstallAware I did my first test but its fail and the problem is the DB, I could not run it after the setup. How can I make the DB work in setup file.
In my delphi project there is two part for DB connections;
the first one with; Query1--->DataScore1
the second one; Table1--->Datascore2
the root of delphi files is "Desktop\ttelekom\ttelekom.exe
the root of DB files is "C:\Program Files\Common Files\CodeGear Shared\Data\databasettelekom.db"
Here the picture of Delphi main form;
http://img267.imageshack.us/img267/5333/77714402.png
Thanks for all.
How are you accessing the database? If it's using the BDE, you have to install the BDE. There's a merge module you can add to your installation, by default in %CommonProgramFiles%\Borland Shared\BDE\ - read the bdedeploy.txt file you'll find there, along with bdeinst.txt.
If you're using another way to access the Paradox files (for instance, ODBC), you'll have to configure that instead.
asilloo, when you said "..As I know there are two programs to create the setup file.." that is not true, exist many options to create installers like wise, nsis, Inno-setup.
for you specific task i will you recommend Inno-setup, because is freeware, reliable, easy to learn and the script language used to create the installers is delphi.
to deploy your application do you need install the bde in client machine. check this sample using inno-setup.
Inno Setup Knowledge Base - HOWTO: Deploy BDE (Borland Database Engine)
Related
Firstly I can't really update the version because I would have to re-write my software which uses the dated components.
I initially had alot of success by re-installing the packages (around 40) to the fresh D5 install on the new Win7 machine. If it told me the .Bpl file was missing it works when I move it to the directory:
C:\Program Files(x86)\Borland\Delphi5\Projects\Bpl
and similarly if the .dcu is missing I move it to the Delphi5\lib directory.
However my next obstacle is when I load any form which has an Advantage table (all of my software uses Adt files and AdsConnections). It gives me the error:
TableX.StoreActive : property does not exist
for many tables and a few more properties including LoginPrompt.
It seems these are not included in my components which were included on my previous installation. I've tried updating to the most recent version of Delphi Sp1 but cannot find any information on how to add these properties.
I've carried out a similar migration: several projects developed in Delphi 5 on XP were moved to Windows 7. Unlike you, I also updated to Delphi 2010 at the same time.
The biggest difficulty I had was the lack of unicode support in my Delphi 5 components - I had to edit a lot of third party code. Of course, if I'd not upgraded to Delphi 2010 I wouldn't have needed to do that. Everything else went swimmingly. Here's how I did it.
First I made a copy of the project on the old machine, went through each form and replaced each of the third-party VCLs with run-time creation. It's a slog writing code to assign all the properties and events, but when I was finished there were only standard Delphi components on my forms but the project still ran correctly. Then I was able to move the project and the third-party .pas files to the new machine, open the project in Delphi 2010 and deal with the unicode issues.
The process was gruelling but straightforward.
Since then I've migrated another older project down the same path, but this time built a new application framework in Delphi 2010 and copied the units across piecemeal. In some cases I used the original .pas and .dfm files, in others I created new forms and copied the functional code. In all these cases I installed into Delphi 2010 the latest equivalents of the original third party components. This took a little longer than the original method.
However you tackle this, best of luck.
I bought Delphi XE2 Starter edition because I can't really afford the other versions and didn't really read the full spec sheet.
Now I find that my old Delphi 7 programs which use TAdoConnection, won't compile as ADO DB is not included in the Starter Edition (although I seem to recall downloading it seperately for Delphi 7).
I would strongly prefer to Download ADOB and install it - can I somehow?
If not, what are my free and low prices options for database access? Preferably ODBC, although I might be able to live with MySql only.
Update: I intend to purchaser AnyDac/UniDac/MyDac (the choice of which will be another question).
However, I couldn't help but notice that my own generic collection of functions is all in a single unit and if I link that unit's DCU with the XE2 starter edition, voila! I have d/b access in the Delphi XE2 starter edition.
There are some commercial data access packages you can get or perhaps this OpenSource one may work for you: http://www.productivity.org/projects/tmysql/
Some commercial options for Delphi and MySQL (and there is support for other databases as well):
http://www.devart.com/mydac/
http://www.microolap.com/products/connectivity/mysqldac/
http://www.da-soft.com/anydac/
AFAIK you can't download additional modules for Starter Edition (even for pay) from Embarcadero, you have to use some thirdparty solution which doesn't depend on TDataSet (as AFAIK it isn't included in Starter Edition). Some options are
KADAO - if you want to stick with ADO;
ZeosLib - open source, supports MySQL, PostgreSQL, Interbase, Firebird, MS SQL, Sybase, Oracle and SQLite;
UIB for Interbase and Firebird;
If you have the starter edition, you can use ZEOS access components.
You can download the XE2 package from SVN.
That's a bit fiddly, so in case you are unfamiliar with SVN here's a step by step.
Download a SVN client: http://tortoisesvn.net/downloads.html
Create a new folder to put the ZEOS components in; I use c:\borland\ZEOS
Right-click, and choose Tortoise SVN from the menu, then checkout or add.
copy paste the following url: https://zeoslib.svn.sourceforge.net/svnroot/zeoslib/branches/testing
There's a minor bug in the sourcecode that prevents it from compiling, see this answer how to fix that: https://stackoverflow.com/a/8389516/650492
As per usual you'll have add the directories the source code resides in to the search path, see: How to correctly set "Directories/Conditionals" and "Library" path
I want to install a Firebird database driver, and to have it available within the Delphi XE IDE. I want the database driver to be usable on the same basis as other, supplied database drivers (eg Interbase, SQL - from within the Data Explorer in the IDE). I have obtained an appropriate driver.
The driver consists of a Delphi project, which compiles to a DLL; and modifications to two .ini configuration files (dbxconnections.ini and dbxdrivers.ini). I assume that the DLL is the actual driver, and I have compiled the project without problem.
I have got this far, and this is where I realised that I do not know what is involved in installing a new database driver; what is involved in installing a new database driver into an IDE; nor where the elements of the installation need to reside.
So my question is:
What steps are needed to install a dbExpress database driver into the Borland XE Delphi Professional IDE?
Some of the specific points I don't know about include -
Does the driver need to be registered with all of Firebase, Delphi and Windows?
Do I need to employ a specific registration procedure to accomplish registration?
Are there any elements I am missing to accomplish my aim?
Where should the installed components be located?
All four vendors, Embarcadero, Borland, UniOpen, and Firebird provide documentation (most of which is very comprehensive) but I have been unable to extract from them what I need to do and where to do it.
I have searched multiple questions on SO, but all of seem to start from the basis that the OP knows what is involved in driver installation.
All the products (except the driver project) generate multiple files in multiple locations, and it is not clear what components belong where. For example, I have multiple versions of the two configuration files residing in:
C:\Users\User\AppData....
C:\Users\Public\Public Documents...
C:\Program Files\Vendor....
....
In addition these products install files into:
the registry (multiple keys);
C:\Program Files....;
C:\Program Files (x86)....;
C:\Windows\System....;
C:\Windows\System 32.....
and probably more.
Environment:
Machine: Lenovo Thinkpad W510
OS: Windows 7 Ultimate
Delphi: Embarcadero® RAD Studio XE Version 15.0.3953.35171
Database: W1-V2.5.0.26074 Firebird 2.5
Database Driver: UniOpen Native DBX Driver
Also Installed:
Embarcado Borland® Developer Studio 2006 Enterprise Version 10.0.2288.42451 Update 2 (XP Version)
Borland Delphi Version 7 (XP Version)
In summary:
What steps and locations are needed to install a dbExpress database driver into the Borland XE Delphi Professional IDE?
You missed a file. :)
DataExplorer, from the best I can tell, uses dbxdrivers.ini. My installation of XE has a single copy of that particular file, located (Win7 64) in C:\Users\Public\Documents\RAD Studio\8.0. The connection types listed in DataExplorer come from the list of installed drivers at the beginning of that file, and each driver has one or more configuration sections which follow that list.
The driver files listed in the configuration section have to exist in a location findable (like any other Windows DLL) by LoadLibrary. The documentation in the link explains the way the API function searches for DLLs; basically though, the IDE has to find it somewhere on the PATH.
The vendor or author of your particular driver should be able to provide the info that needs to go in the dbxdrivers.ini file. (I'm not familiar with UniOpen personally, and don't have FireBird on this particular machine.) The IDE only reads that file during startup, so you'll need to (re)start the IDE after making the additions.
This post at the Embarcadero Delphi Database->DBExpress forum may help with defining aliases for your Firebird databases, and describes connecting via the TSQLConnection component. (Look for a post by Ralph Horbury-Smith.) If you don't have a Developer's Network ID, you'll need to register with the Embarcadero site; the link I provided uses HTTPS for some reason. You can also get to their forums via NNTP; I'm not using a newsreader, so I'm not sure what the address would be. There's a link to connection info on this page at Embarcadero.
There's also some information available on the Delphi XE documentation Wiki pages that might help as well.
EDIT: Found one more link at the DBExpress forums that might interest you. It has a link for another FB DBExpress driver and specific information for the dbxdrivers.ini file for that driver. It's the post by Phillip Flores (about the 3rd one down on the page).
I am accepting #Ken's answer. His response provided links to various resources. I am summarising the answers to the specific points I had that I have obtained from the references.
There is no need to amend dbxconnections.ini - the IDE will do that for me.
I need to amend dbxdrivers.ini appropriately and place it in the IDE directories.
The actual driver needs to be somewhere on the path - typically System32.
There is no need to register the driver with Windows.
Apart from the items listed above, there is no special procedure needed to register such drivers.
The list here appears complete.
EDIT:
My conclusions in this summary were premature and I have asked a further question to try and obtain further information. The strikeout in the list above marks the incorrect elements.
Connecting to ADO is hard from installation in Delphi, so I decided to use VBscript, which I have never used before. VBscript has little support in Delphi, so how do I run a Windows script editor to get support and carry it over to Delphi? I do not understand the statements in VB script very well yet
My Delphi TTable is connecting to
the ADO
I need to connect to a
Microsoft DB file in c:\program
files\common\my folder\my file
I need to disconnect the ADO to
relocate this file and place a new
copy in its place periodically.
I looked up the MSN web site and it's not that helpful.
I see scripts that could be useful for many things if I can get them working.
Can anyone help please?
Lex Dean
The best way is to use the native (and easy) ADO components in Delphi.
You will found a example of 'how to do', with source, here :
http://sourceforge.net/projects/axbase/
You do not connect to ADO. You connect to a DB through ADO. ADO is a technology to connect to different databases using a common API - the database native API is taken care of by ADO drivers.
You say you need to connect to a "Microsoft DB" file but do not specify what kind. ADO can connect directly to Access files, but if you use SQL Server you never connect to a file, you connect to the database server.
Delphi has a different set of components to connect through ADO. They are the TADOxxxx component. TTable is built upon the BDE, and can't use ADO. Use TADODataset or TADOTable.
Using VBScript from Delphi is possible, but would not solve your problem easily - you will have to pass ADO objects to and from Delphi and VBScript, and it requires a good knowledge of Delphi, Windows, COM and so on. If you need to use ADO, take the straight path.
I've taken over a legacy application and I have the exe created. If I can configure the BDE then in theory it should be possible to run this. Someone indicated that Delphi needs to be installed in order for the app to run. I'm unsure of that - it doesn't quite make sense to me as there is an exe file. Any input from Delphi experts would be appreciated.
Roddy
If the application uses the BDE then the BDE has to be installed before the exe can run. The BDE files are not linked into the exe.
A Delphi installation normally also installs the BDE. This might give the impression that Delphi has to be installed to run the exe, but that is not true.
According to the deployment licence you have to use something like InstallShield Express that comes with Delphi to create some setup for the BDE, but I might be mislead here. You may even try to google for a BDE installer or have a look at this question.
Your application should work without installting Delphi if it wasn't built to use runtime packages(BPL files).
If it was built to use runtime packages, you'll need to deploy them with your application. Since all delphi's runtime package are installed with Delphi, that may give the impression that installing delphi is required for the application to run, which is not the case.
You might however need to install delphi to retrieve the required BPL files.
BPL files are special DLL files that delphi can refers to instead of linking all code into the .Exe, making EXE files much smaller.
So if you manage to get the BDE up, create the right aliases in it, and get all required BPL(if any), the application should start up correctly.
1 last thing that might need to be deployed with your application is midas.dll. (If the application use, for exemple, Tclientdataset)
That's all I can think of for now...
It seems very awkward to me that Delphi needs to be installed to run your application. Maybe your application is build with runtime packages which means you have to include the bpl's the application depends on, but Delphi itself should not be needed.
You can test this yourself, just run the app on a computer without Delphi installed. When it gives an error about a bpl not found, you have to find that bpl and add it to the directory where your application is located.
Uwe has the answer here. if your application uses any of the data components provided by Delphi it will almost always require the BDE to be installed and other drivers if for example you are talking to Oracle then the Oracle OCI drivers must be installed.
You do not need Delphi to install the BDE but you need to find the BDE installer and have it installed. MANY programs out there use the BDE and not just Delphi since it was licensed by many companies.