PowerBuilder .NET Datatype Mapping
The PowerBuilder to .NET compiler converts PowerBuilder datatypes to .NET datatypes.
PowerBuilder | C# |
---|---|
boolean | bool |
boolean[] | bool[] |
blob | byte[] |
blob[] | byte[][] |
byte | byte |
byte[] | byte[] |
int | short |
int[] | short[] |
uint | ushort |
uint[] | ushort[] |
long | int |
long[] | int[] |
ulong | uint |
ulong[] | uint[] |
longlong | long |
longlong[] | long[] |
decimal | decimal |
decimal[] | decimal[] |
real | float |
real[] | float[] |
double | double |
double[] | double[] |
string | string |
string[] | string[] |
User-defined structure | class |
User-defined structure[] | class [] * |
User-defined NVO object | class |
User-defined NVO object[] | class [] * |
enumerated | enum |
enumerated[] | enum[] |
Time | DateTime |
Time[] | DateTime[] |
Date | DateTime |
Date[] | DateTime[] |
Datetime | DateTime |
Datetime[] | DateTime[] |
any | Not supported |
Multidimension array | Not supported |
PB system structure | Not supported |
PB system object type | Not supported |
PB system nvo type | Not supported |
User-defined non-NVO object | Not supported |
ResultSet and its descendants | Not supported |
Returning any | Array type |
Dot Net serializable type (with Serializable or DataContract attributes) | Dot.Net serializable type |
Dot Net primitive type | Dot Net primitive type |
4 Responses
[…] To my surprise, creating the Web Service was very easy. The code inside my non-visual user object was simple as I have been working with datastore’s for years and using them comes second nature to me. The only real difference between creating a basic non-visual in a PB application, or using one for a Web Service, are that you have to make a lot of settings on the project object that you were not used to seeing and you need to know the basics about WCF Services. You need to think about which functions you want to be “exposed” inside the .NET application. Then you need to understand which data types you can use without problem and how the various data types map between PB and .NET. […]
[…] still debug a WCF Service just like any other PB application. You need to be cognizant about how the various data types map between PB and .NET. PowerBuilder 12.5 .NET WCF Service – NVO […]
[…] Mapping PowerBuilder and .NET (C#) data types. – This is a reference page containing mapping of PowerBuilder and .NET (C#) data types. […]
[…] Mapping PowerBuilder and .NET (C#) data types. – This is a reference page containing mapping of PowerBuilder and .NET (C#) data types. […]