This is a first trial Post for those who are migrating from the free ZEOS component to the Supported UniDac components. I will update this post which would be a reference like my other post regarding Migration from ZEOS to MyDac. Hope this helps.
These are the tools used:
* GExperts @ http://www.gexperts.org/: I used Grep Search a lot to find items in the files.
* Beyond Compare @ http://www.scootersoftware.com/:
Of course you need to backup your project before starting the migration steps. I take no responsibility for any problems.
Before you start you need to make all forms Text DFM (right click on a form then select Text DFM at the end of the context menu)
In dfm files do the following (open the files as text from an external editor if you want)
* Replace TZConnection with TUniConnection and User to UserName and replace Protocol with ProviderName and delete TransactIsolationLevel properties.
* In ProviderName adjust the property value to (SQL Server, mySQL, ...), change HostName with Server
* Replace TZQuery with TUniQuery
* Replace TZReadOnlyQuery with TUniQuery and add ReadOnly = True be careful to do this step in the same time or you might loose track of which is which.
* Replace TZTable with TUniTable
* Replace LinkedFields property with DetailFields
* Replace SortedFields property by IndexFieldNames if needed
* Delete WhereMode property from TUniQuery
* Delete ShowRecordTypes property.
* Replace TZUpdateSQL with TUniUpdateSQL component notice that TUniQuery already have the updates properties and you might not need a TUniUpdate any way
* Delete All Params properties from UpdateSQL components since it is not there (needs more work, I'm still looking at it)
* Delete UseSequenceFieldForRefreshSQL from UpdateSQL components
* Replace TBooleanField with TStringField unless you used TinyInt as mentioned later.
* If you have FastReport and you have installed its related components, then replace frxZEOSDatabase with frxMyDacDatabase.
* In DBCheckbox component change the ValueCheck property from True to Y and the ValueUnchecked from False to N.
In Pas code files
* Replace EZSQLException with EUniError and add MyClasses to the uses
* Replace LinkedFields code lines with DetailFields
* SortedFields don't exist in MyDAC so replace them with IndexFieldNames
* Change HostName property to Server
* Change Protocol to ProviderName
* Replace ParamByName with Params.ParamByName
FastReport Items in your code:
* If you use frxMyDacDatabase in your code, change User property to UserName, and remove Protocol
* For frxUniQuery keep ParamByName
* For frxUniQuery replace .AsInteger, .AsString, ... to Value
Units used:
* Remove ZConnection, ZAbstractRODataset, ZAbstractDataset, ZAbstractTable, ZDataset, ZSqlUpdate units from the pas files.
Migration from ZEOS to UniDac
-
AndreyZ
Re: Migration from ZEOS to UniDac
Hello,
1. i see that migration still not implemented;
2. additional to post:
in .dfm files
+ Replace TZSQLProcessor with TUniScript
in .pas files
+ Replace TZSQLProcessor.Script with TUniScript.SQL
+ Replace .GetCatalogNames with .GetDatabaseNames
under uses
+ Remove ZConnection, ZAbstractRODataset, ZAbstractDataset, ZAbstractTable, ZDataset, ZSqlProcessor, ZSqlUpdate, ZAbstractConnection
+ Add Uni
Connection setting .Ping can be replaced with .ExecSQL('SELECT NULL', [])
1. i see that migration still not implemented;
2. additional to post:
in .dfm files
+ Replace TZSQLProcessor with TUniScript
in .pas files
+ Replace TZSQLProcessor.Script with TUniScript.SQL
+ Replace .GetCatalogNames with .GetDatabaseNames
under uses
+ Remove ZConnection, ZAbstractRODataset, ZAbstractDataset, ZAbstractTable, ZDataset, ZSqlProcessor, ZSqlUpdate, ZAbstractConnection
+ Add Uni
Connection setting .Ping can be replaced with .ExecSQL('SELECT NULL', [])