Questions? Feedback?powered byOlark live chat software
Bug 2477

Retrieve Any datatype 15 March, 2019

Sally D
12 March, 2019
Product: PowerBuilder Category: DataWindow
Version: 2017 R3 Publishing: Public
Status: Verifying Priority: P3
Classification: Resolution:
Ken Guo 15 March, 2019
Hi Sally,

We are sincerely apologize that we are not able to provide any assistance as regard to .net assembly.

We recommend posting tech how-to/advice questions to the Appeon Community: https://community.appeon.com. Questions posted to the Appeon Community may be responded to by Appeon support staff, MVPs, or other product users.

Since PB .net assembly feature is obsoleted, we discontinued to maintain it anymore: we will not enhance it anymore and will not fix bugs either even if there’re bugs present. Therefore it is not suggested to use it. 

Appreciate your understanding. 

Regards,
Ken
Sally D 14 March, 2019
Hi Ken
As we are using PB 2017 to migrate our legacy system, there are hundreds of DataWindows that call this generic function
ll_rows = ads_data.Retrieve(lany_args[1], lany_args[2], lany_args[3], lany_args[4], lany_args[5], lany_args[6], lany_args[7], lany_args[8], lany_args[9], lany_args[10], lany_args[11], lany_args[12] , lany_args[13], lany_args[14], lany_args[15])
The types of fields passing into this function are dynamic, each Window is different, if we don’t use Any type to receive, we may need to turn this generic function call to specific call for each DataWindow like this
ll_rows = ads_data.Retrieve(name, id, amount, “”, “”, “”….) 
which will require massive amount of effort, and the code will look ugly. 
The above function is encapsulated, is it possible we refactor it? instead of passing Any arguments, can we pass two sets of array, one set for data type, another set is for actual value in String format, and then do the type conversion in there.

Thanks.
Sally
Ken Guo 13 March, 2019
Hi Sally,

As for the Any datatype, sorry but there is no replacement method to solve this. I recommend you modify the software’s business or logic to use basic data type.


Regards,
Ken
Sally D 13 March, 2019
Hi Ken,

As the PB2019 will not support Sybase DB when generate C# code automatically. Our project is complex and big and the time is urgent. So we could not consider that now.

For the Any datatype,  when we retrieve the datawindow, using the parameter, if not using any datatype, is there any replacement method to solve this? As the parameter type is not all the same, so we could not point that as specific type.
Ken Guo 12 March, 2019
Hi Sally,

Thanks for reporting this issue. The any datatype is not supported for PB .net.
see also:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc33822.1250/doc/html/den1305825325876.html

BTW, PB .net assembly feature is obsoleted, we are not maintain it any more.
So it is not recommended to use PB .net assembly, please use Httpclient(PB 2017 provided) and C#(PB 2019 will provide) to develop .net feature. 

Regards,
Ken
Sally D 12 March, 2019
*Phenomenon:
When using .net assembly, using retrieve function to retrieve datawindow, if using Any datatype as 
parameter of retrive. Retrieve(Any parameter1) like this, but the actually datatype is number for parameter1, then error occurs. It is ok in PB, but once change to .net assembly, invalidcastexception.
*Reproduce Steps:


Remarks:
OS:
Windows 7 
Platform:
 
Database Type:
 
Database Version: