1. tri do
  2. PowerBuilder
  3. Sunday, 13 October 2019 11:25 AM UTC

Hello,

When I generate C# models from PB, I see there is .cs and .srd files in the C# project, I see that the .srd file contains data window information, but I couldn't figure out how to use it.

What is the purpose of this file and how can I use it and leverage it in the C# project?

Thanks.

Attachments (1)
Accepted Answer
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Sunday, 13 October 2019 17:29 PM UTC
  2. PowerBuilder
  3. # Permalink

The .SRD is for internal use by the product and not meant to be manipulated by the developer.  All development and modification to the .SRD should be done using the DataWindow designer.  

As Miguel and Michael have pointed out, in PowerBuilder 2019 R2 we are removing the .SRD.  The reason for this change is to remove the dependency on the DataWindow designer, for example like what you pointed out you want to directly manipulate that info.  Also, it is to help ensure your project is compatible with any 3rd party tools (e.g. Git source control, code analyzers, testing frameworks and tools, any C# IDE, etc.)

We will be putting the relevant parameters (e.g. non-visual) into the current model and templates of the .NET DataStore.  If you are going to Elevate 2019 conference in Philadelphia you will be able to see this.  If you can't go, please check back the Elevate website at the end of November for the video replays.

Comment
  1. tri do
  2. Monday, 14 October 2019 07:12 AM UTC
Thank you for your information.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Monday, 14 October 2019 16:38 PM UTC
You're welcome.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Sunday, 13 October 2019 13:09 PM UTC
  2. PowerBuilder
  3. # 1

SRD is the exported source of the DataWindow.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Sunday, 13 October 2019 11:51 AM UTC
  2. PowerBuilder
  3. # 2

I don't know how to answer your question right now without having to look into it (no time), but let me warn you:

In PB2019 R2, there'll be NO MORE .srd, so I'm not sure if this is worth looking into?

Appeon has made some changes, also in the namespace. This is an excerpt from an email which I got from Appeon:

 

Two major changes to PowerBuilder Data in the coming 2019 R2:

  1. The name of the PowerBuilder.Data library is changed to DWNet.Data;
  2. There is a major refactoring of .NET DataStore: in 2019 GA version, .NET DataStore must work with the SRD file; in R2, .NET DataStore has moved away from dependency on SRD and becomes standard C# model.

Because of the above changes, if you upgrade PowerBuilder 2019 to 2019 R2, the existing API names would be the same, but the namespaces related with “PowerBuilder.Data” need be updated. We decided to make this change because we think it will be beneficial for greater adoption of this powerful technology by .NET developers and new projects.

 

Regards,

Comment
  1. Michael Kramer
  2. Sunday, 13 October 2019 12:45 PM UTC
I agree. Ignore the .SRD. It is there for historic reasons - as a way for PB to convert PowerScript's DataWindow syntax into C# syntax. Like temp files during compilation that initial compiler version didn't delete.

Though I have vested 25 years of career on PowerBuilder/PowerScript I still believe Appeon has made the right choice for their .NET Core development.
  1. Helpful
  1. tri do
  2. Monday, 14 October 2019 07:12 AM UTC
Thank you very much for your quick reply.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.