Upgrading from Data Abstract 7 to 9 for delphi


(Warren_Postma) #1

I have an application which hasn’t been upgraded in a long time. I’d like to move it
from Data Abstract 7 to 9. Is there anywhere a list of all the breaking changes between 7 and 9?

Things I’ve noticed so far:

  1. Unit names have been changed (most of my uses clauses contain wrong unit references).

  2. I can no longer find TDASqlCondition. I have no idea how code like this gets ported:

     function WhereCodes(ds:IDADataset; fieldName,fieldValues:String;likeFlag:Boolean):Boolean;
     // fieldValuesSet:String;
      n : Integer;
       result := False;
       if (fieldvalues='')or(Pos('''',fieldvalues)>0)or (Pos('--',fieldValues)>0)or (Pos('/*',fieldValues)>0)  then
       if (fieldname='')or(Pos(' ',fieldName)>0)or (Pos('''',fieldName)>0) or (Pos('--',fieldName)>0) or (Pos('/*',fieldName)>0)then
       if likeFlag then
     	condition := cLike
     	condition := cEqual;
       if Pos(',',fieldvalues) = 0 then
     	if likeFlag then
     	   fieldValues := fieldValues + '%';
     	ds.Where.AddCondition( fieldName, condition, fieldValues );
     	s := TStringList.Create;
     	s.Delimiter := ',';
     	  s.DelimitedText := fieldValues;
     	  ct := s.Count-1;
     	  if s[ct]='' then
     	  for n := 0 to ct do
     		fieldValues := s[n];
     		if likeFlag then
     		   fieldValues := fieldValues + '%';
     		if (n<ct) then
  3. My DA data modules no longer function. Entire things like TDASchema are gone. All my data modules are totally corrupted by opening them in a delphi version with the new DA 9 stuff installed. There’s no migration wizards, no help. It’s like I’ve gone a bridge too far, or several.

Can I upgrade from 7.0 to 8.3 without a major crazy fest? Or was 7.0 the end of a line, and is now discontinued, and 8.0 and 9.0 are rewrites with the same product name and a totally different implementation?

Related but not very detailed question

(EvgenyK) #2

pls read the Breaking Changes article

what exactly setup you have used? looks like you have installed client edition (Data Abstract for Delphi) instead of server one (Data Abstract for Delphi, Server Edition). as a result all server-side component aren’t installed.

this class in uDAPlainWhere.pas unit. you need to check Legacy component in installer.
Note you need to pass TDADataTable instance into WhereCodes method, so your code will look like

table.Where.AddCondition(fieldName, condition, fieldValues);

instead of

ds.Where.AddCondition( fieldName, condition, fieldValues );

(Warren_Postma) #3

That’s a hell of a breaking change to rename your server product to add the word “Server Edition” leaving the product that used to be a client server product, a client only product, which makes NO SENSE to me. Naming truly is one of the hard problems in computer science. But renaming a product in this way makes me truly unhappy. If you want to release a crippled client only edition by all means do so, and call it Crippled Client Only edition. Don’t rename the non-crippled product so that people all download the wrong version.

I have no words to describe how silly this change was on your end. Even apple wouldn’t do something THIS silly.

(marc hoffman) #4


but don’t hold back, ho do you really feel?

that said, what’s your concrete problem here? We haven’t actually sold the Client-only edition separately in years; back when we introduced, it, all existing users were grand-fathered into the Server edition, forever, so no-body was ever “downgraded” or lost server support. What exactly is your concern?


(Warren_Postma) #5

It’s confusing to people. I felt like I wanted to blog about this product which is awesome, and was confused by the rename, which perhaps won’t affect anyone else because only a handful of people like me remember the old naming.

I’m over it now. It’s fine. The names are the names. But just wanted to let you know exactly how confusing it is when the name X is no longer X but is 0.25 of X.


(Warren_Postma) #6

More things I’m now looking for that seem to be gone:

TROEncryptionEnvelope - No longer installed as a component. I did select legacy components to be installed. I expected it to be installed at designtime.

(EvgenyK) #7

looks like it was dropped under refactoring.
as a workaround, pls add it into RemObjects_Core_Reg.pas like

  uROEncryptionEnvelope, //added
      TROJSONMessage, TRODynamicRequest, TROEncryptionEnvelope, // changed

and recompile RO_Core package

(RemObjects) #8

Thanks, logged as bugs://77664

(RemObjects) #9

bugs://77664 got closed with status fixed.

(Warren_Postma) #10

Wow guys you are awesome.

Another thing I used to do in data abstract services, is log the generated SQL like this, how do you do it now that IDADataSet doesn’t have an SQL property anymore?

Something I used to write:

procedure TDataService.DatasetBeforeOpen(const Sender: IDADataset);
  if DebugFlag then
    Trace('-- '+Sender.Name+' --');
    Trace(Sender. SQL);


(EvgenyK) #11

cast IDADataset as IDAServerDataset for using at server-side, something like

Trace((Sender as IDAServerDataset).SQL);

Note: this interface is put into uDAServerInterfaces unit

(Warren_Postma) #12

You know a complete guide to upgrading from DA 7 to 9 would be good. Your breaking changes doc is useless for that.

Maybe you need a blog post or something more detailed? I don’t seriously see how people can manage the level of breakage here.

I lost whatever migration work I did in April (hard drive crash) and I’m trying to do it all again now in September, and I really literally just reached the point where I said, you know, we’re just porting DA 7 to Delphi 10.x and never ever moving up.

(EvgenyK) #13

I think, better to ask here these questions because they may be related to deprecated and outdated stuff.

in DA8 we have split DataAbstract to client and server editions.
as a result, some refactoring was done, like

  • some server-side interfaces from uDAInterfaces.pas were moved to uDAServerInterfaces.pas
  • uDAClasses.pas unit was removed. content of it was put to other files:
    • uDACore.pas
    • uDAStreamableComponent.pas
    • uDAConnectionManager.pas
    • uDADataDictionary.pas
    • uDADiagrams.pas
    • uDAUpdateRule.pas
    • uDADatasetRelationship.pas
    • uDASchema.pas
  • some server-side properties of IDADataset interface were moved to IDAServerDataset. server-side events/methods still use IDADataset for backward compatibility. casting <IDADataset> as IDAServerDataset will return valid IDAServerDataset interface, e.g. lsql := (ldataset as IDAServerDataset).SQL;
  • support of TDAWhere was removed from IDAServerDataset in favour DynamicWhere property. for backward compatibility is possible to set prepared where statement via IDALegacyWhereSupport interface as (ldataset as IDALegacyWhereSupport).WhereClause := 'ID > 100'
  • support of TDAWhere was removed from TDADataTable. for backward compatibily, class helper for TDADataTable with Where property was added into uDAPlainWhere.pas