TUniBatchMove is an Undeclared identifier
TUniBatchMove is an Undeclared identifier
Good day,
We have used the Migration Wizard on one of our old, huge and complicated project that makes use of BDE to access Paradox. After the tool had succeed to make all the necessary code conversions, we tried to start the project, but received this error: "[DCC Error] USimple.pas(344): E2003 Undeclared identifier: 'TUniBatchMove'", tried to replace it with TCRBatchMove, but the same error occurs. This type was set in place of TBatchMove. Maybe we have to add another using or/and search path or/and anything else...What have we missed?
Any help would be very appreciated...
We have used the Migration Wizard on one of our old, huge and complicated project that makes use of BDE to access Paradox. After the tool had succeed to make all the necessary code conversions, we tried to start the project, but received this error: "[DCC Error] USimple.pas(344): E2003 Undeclared identifier: 'TUniBatchMove'", tried to replace it with TCRBatchMove, but the same error occurs. This type was set in place of TBatchMove. Maybe we have to add another using or/and search path or/and anything else...What have we missed?
Any help would be very appreciated...
-
AndreyZ
Hello,
Thank you for the information. We have fixed this problem. This fix will be included in the next UniDAC build.
To solve the problem, you should replace TUniBatchMove with TCRBatchMove in the *.pas and *.dfm files of your project. Also, you should add the CRBatchMove unit to the USES clause of all units that use TCRBatchMove.
Thank you for the information. We have fixed this problem. This fix will be included in the next UniDAC build.
To solve the problem, you should replace TUniBatchMove with TCRBatchMove in the *.pas and *.dfm files of your project. Also, you should add the CRBatchMove unit to the USES clause of all units that use TCRBatchMove.
-
AndreyZ
-
AndreyZ
UniDAC doesn't work with aliases, that's why there is no property corresponding the TDatabase.AliasName one in UniDAC. You should remove the AliasName property usage from your project manually. The TDatabase.DatabaseName and TUniConnection.Database properties have different meanings, that's why Migration Wizard does nothing with TDatabase.DatabaseName.
Yes, as we seen, TUniTable has Connection property insted of TTable's DatabaseName, and TUniConnection has Database instead of AliasName, and Name(that is used now in TUniTable Connection field) that seems to come instead of both TDataBase's DatabaseName(that was used in TTable) and Name object identifier...
-
AndreyZ
The following example explains the difference between the TUniTable.Connection and TTable.DatabaseName properties:Also, AliasName in BDE means a set of all connection options that were set in BDE Administrator. In UniDAC, you should set all the connection options using the correspondent TUniConnection properties (like Server, Database, Username, Password, Port, etc.).
Code: Select all
var
Database1: TDatabase;
Table1: TTable;
UniConnection1: TUniConnection;
UniTable1: TUniTable1;
begin
Database1.DatabaseName := 'test'; // 'test' is not a database name on the server, it is the name that will be used for other BDE components (like TTable)
Table1.DatabaseName := 'test'; // TTable.DatabaseName uses the database name that is written in the Database1.DatabaseName property, but not the TDatabase component itself
UniConnection1.Database := 'test'; // 'test' is a database name on the server
UniTable1.Connection := UniConnection1; // TUniTable.Connection uses the TUniConnection component itself, but not its name
end;