1. Bernie Rivera
  2. .NET DataStore
  3. Wednesday, 3 June 2020 19:25 PM UTC

We are converting our PowerBuilder code to C# and we are not quite sure how to translate the following PowerBuilder code in C#.

doArticle.object.data.Delete.Current[1, 1] = il_null

Can't seem to find a way to modify data in any buffer except primary with a C# DataStore<T>.

Is it possible to modify buffer data other than primary?

Accepted Answer
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Thursday, 4 June 2020 05:29 AM UTC
  2. .NET DataStore
  3. # Permalink
 

Hi Bernie,

Please add "using PowerScript.Bridge". There is an extended SetItem method in this package. You can use it to set an item in the Delete buffer:

ds1.SetItem(0, 0, null, DwBuffer.Delete);

BTW: Could you tell us more about the reason to set a value in the Delete buffer?

Regards,

Logan

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 4 June 2020 21:35 PM UTC
That is excellent to hear! You are using PowerScript Migrator?
  1. Helpful
  1. Bernie Rivera
  2. Friday, 5 June 2020 14:20 PM UTC
Yes, it is our key tool. But it would be nice if the tool could be used as a standalone converter since sometimes it does not work since every once and a while it has trouble reading a SRD file. As a matter of fact I am converting a method right now that I have to do manually since the tool refuses to convert it.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 5 June 2020 14:23 PM UTC
Also, are you doing a full build and optimize of your PBLs in the PowerBuilder IDE before you try to convert? Often times PBLs become corrupted over many years of developing.

If the problem still continues, please open a support ticket and attach the file it is not reading correctly so we can debug this. Thanks.
  1. Helpful
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 3 June 2020 19:50 PM UTC
  2. .NET DataStore
  3. # 1

Hi Bernie,

 

You can access other buffers too. See the following link: https://docs.appeon.com/appeon_online_help/dwconverter2019r2/api_reference/DWNet.Data/DataStore/DwBuffer/DwBuffer.html

 

What are you using to migrate your PowerScript? You would normally do so with SnapDevelop and a PowerBuilder 2019 R2 CloudPro subscription.

 

 

Regards,

Comment
  1. Bernie Rivera
  2. Wednesday, 3 June 2020 22:01 PM UTC
I am using SnapDevelop, but it did not convert that code. And that link is only for the Enum. I know I can look at data using GetItem and choosing which buffer I want, but you don't have that ability as far as I can tell when using SetItem to choose a buffer. It only allows you to set data for the Primary Buffer. I want to set data for the Delete buffer.
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.