You can open the .dfm
in a text editor (like Notepad), and change the AdsConnection.Connected
property to false
, and change any AdsTable
or ADSQuery
component's Active
flags to false
as well. (I'd suggest closing the IDE first, to make sure it doesn't cache a reference.) This will at least let you open the project and make whatever changes are needed to compile with the new version of ADS.
If the file has been updated through many older versions of Delphi prior to XE, there's a chance you still have a binary format .dfm
file (meaning you'll see all kinds of strange symbols in Notepad when you open the .dfm
file). If that's the case, Delphi includes a conversion utility (convert.exe
, found in your $(DELPHI)\Bin
folder), and you can use the following steps to convert it to text format and then make the changes (there's no need to convert it back after - the default is to create text .dfm
files when new forms are created, and Delphi uses them very well as text).
Make a backup copy of your datamodule's .DFM
somewhere safe first!
After making the backup copy, open a command window in your project folder, and run
Convert.exe -1 YourDataModule.dfm
The command says to convert in place (-i
), which means the existing binary .dfm
is overwritten by the new text .dfm (and the reason I stressed making a backup copy first). If you don't want to overwrite, you can omit the -i
switch, and it will create a YourDataModule.txt
file in the folder instead; you can then manually rename YourDataModule.dfm
to a different name, and then rename YourDataModule.txt
to YourDataModule.dfm
.