1. Miraben Apani
  2. .NET DataStore
  3. Tuesday, 24 January 2023 20:39 PM UTC

Hi,

I have converted two Datawindows into C# using Snap Develop, have two .NET Datastores, created a WEB API(c#) .I am using ODBC data connection. Working on Transaction management at API side, how to pass multiple DWs from PB (Client side) to API side. If I have dw_1 and dw_2, on ue_savechanges() event, which will accept changes from both DWs at PB side , how to bundle the changes and send it over to WEB API in single transaction?

Thanks,

 

Miraben Apani Accepted Answer Pending Moderation
  1. Monday, 6 February 2023 14:27 PM UTC
  2. .NET DataStore
  3. # 1

Thanks for all responses.

At PB side, I am able to get two DWs with modified data in ls_json using JSON Package, at API side I am using DataPacker and DataUnpacker, tried using Update() and SaveChanges() for transaction management - unable to Save changes in database.

When I debug the code both Datastores which I am using with Data packer/unpacker both became empty. 

Any suggestion on "how to" at API side, so that data gets saved in database successfully?

Comment
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 25 January 2023 02:40 AM UTC
  2. .NET DataStore
  3. # 2

Hi Miraben,

Except for the JSONPackage on the Client side, you can use IDataPacker.GetDataStore method to help you to get two .NET DataStores from the JSON on the Web API side: https://docs.appeon.com/net_datastore/4.x/api_reference/DWNet.Data/DataStore/DataStorePackerExtensions/Method/GetDataStore3.html

There was a similar post about this question: https://community.appeon.com/index.php/qna/q-a/process-jsonpackage-in-snapdevelop-controller

For how to Work with Transactions in .NET DataStore, please refer to: https://docs.appeon.com/dwconverter2022/Working_with_Transactions_in_.NET_DataStore/index.html#transactions-using-datacontext-transaction-apis

Regards, Logan

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 24 January 2023 21:00 PM UTC
  2. .NET DataStore
  3. # 3

Hi Miraben ;

  For that "use case", you would use the JSONPackage Object class ...

FYI:  https://docs.appeon.com/pb2019/objects_and_controls/ch02s45.html

HTH

Regards ... Chris

 

Comment
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.