Syntax 2: For variables – PB Docs 2019
Syntax 2: For variables Description Provides the datatype of a variable. Syntax
|
1 |
ClassName ( variable ) |
Argument Description variable The name of the variable for which you want to know its name (that is, its datatype) Return value String. Returns the name of variable. Returns the empty string (“”) if variable is an enumerated datatype or if an…
Connecting to a COM server – PB Docs 2019
Connecting to a COM server To access a method associated with a component in the COM server, the PowerBuilder client connects to the component using its programmatic identifier (ProgID) or its class identifier (CLSID). You can use a tool such as OLEVIEW or the OLE tab in the PowerBuilder Browser to view the Program ID…
GetDateValue – PB Docs 2019
GetDateValue Description Returns the value of a PBDOM_ATTRIBUTE object as type Date. Syntax
|
1 |
pbdom_attribute_name.GetDateValue(string strDateFormat) |
Argument Description pbdom_attribute_name The name of the PBDOM_ATTRIBUTE strDateFormat The date format for the return value, for example, MM:DD:YYYY The value of the strDateFormat parameter can use slashes or colons as delimiters. The following table illustrates characters with special meaning in…
Setting the language for OLE objects and controls – PB Docs 2019
Setting the language for OLE objects and controls When you write automation commands, you generally use commands that match the locale for your computer. If your locale and your users — locale will differ, you can specify the language you have used for automation with the SetAutomationLocale function. You can call SetAutomationLocale for OLE controls,…
Creating a PowerBuilder object to be called from C++ – PB Docs 2019
Creating a PowerBuilder object to be called from C++ To keep the code for this example simple, create an application with one custom class user object that has one function. The function returns the product of two integers: In PowerBuilder, create a new workspace. Select the Application icon from the Target page of the New…
Example 1 (using OAuthClient) (recommended) – PB Docs 2019
Example 1 (using OAuthClient) (recommended) Step 1: Get the RESTful server access token. Step 2: Get the RESTful server resource. The complete code example is as below:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
OAuthClient loac_Client TokenRequest ltr_Request TokenResponse ltr_Response OAuthRequest loar_Request ResourceResponse lrr_Response String ls_AccessToken String ls_Body, ls_type, ls_description, ls_uri, ls_state Long ll_return loac_Client = Create OAuthClient <span><strong>//Step 1: Get the RESTful server access token.</strong></span> //The following line is fake code. Replace it with settings //from your OAuth 2.0 authorization server provider. ltr_Request.tokenlocation = "https://xxx.xxx.xxx/oauth2/token" ltr_Request.Method = "POST" ltr_Request.secureprotocol = 0 ltr_Request.clientid = "367c4163ddc1427d96655cd220c6714b" ltr_Request.clientsecret = "4079f8749939446cbc81fd0c27709187" ltr_Request.UserName = "username" ltr_Request.Password = "password123" ltr_Request.scope = "testcode" ltr_Request.granttype = "password" ll_Return = loac_Client.AccessToken( ltr_Request, ltr_Response ) If ll_Return = 1 and ltr_Response.GetStatusCode () = 200 Then ll_Return = ltr_Response.GetBody(ls_Body) If ll_Return = 1 Then ls_AccessToken = ltr_Response.GetAccessToken() <span><strong>//Step 2: Get the RESTful server resource. </strong></span> loar_Request.Method = "GET" //The following line is fake code. Replace it with settings //from your OAuth 2.0 authorization server provider. loar_Request.Url = "https://xxx.xxx.xxx/order/getall" loar_Request.SetAccessToken( ls_AccessToken ) ll_Return = loac_Client.RequestResource( loar_Request, lrr_Response ) If ll_Return = 1 Then ll_Return = lrr_Response.GetBody(ls_Body) If ll_Return = 1 Then MessageBox ( "Resource", ls_Body ) End If Else MessageBox( "Requestresource Falied", "Return :" + String ( ll_return ) + "~r~n" + lrr_Response.GetStatusText() ) End If End If Else ll_Return = ltr_Response.GetTokenError(ls_type, ls_description, ls_uri, ls_state) MessageBox( "AccessToken Falied", "Return :" + String ( ll_return ) + "~r~n" + ls_description ) End If If IsValid ( loac_Client ) Then DesTroy ( loac_Client ) |
Document get from Powerbuilder help Thank you for watching.
Picture.property – PB Docs 2019
Picture.property property (DataWindow object) Description Settings that control the background picture displayed in a DataWindow object. Picture properties are not supported in RichText, Graph, or OLE DataWindow presentation styles. Applies to DataWindows Syntax PowerBuilder dot notation:
|
1 |
dw_control.Object.datawindow.picture.property |
Describe and Modify argument:
|
1 |
"DataWindow.picture.property { = value }" |
Parameter Description property A property for the picture background. Properties and their settings…
Classes – PB Docs 2019
Classes .NET classes are supported, except for the following: Interface Struct Abstract, Generic, Internal, Partial, Protected, Private, or Static class Nested class is supported, except that using the plus sign (“+”) instead of the dot (“.”) to access the nested class: [namespace].[class]+[nested-class]. Document get from Powerbuilder help Thank you for watching.
Categories of DataWindow events – PB Docs 2019
Categories of DataWindow events The reference entries are listed in alphabetical order. To help you find the event you need, the events are organized here by the type of actions that trigger them. Changing data EditChanged ItemChanged ItemError DropDown for drop-down lists Database access DBError RetrieveStart RetrieveRow RetrieveEnd SQLPreview UpdateStart UpdateEnd Error handling DBError Error…
Sample declarations – PB Docs 2019
Sample declarations Suppose you have created a C dynamic library, SIMPLE.DLL, that contains a function called SimpleFunc that accepts two parameters: a character string and a structure. The following statement declares the function in PowerBuilder, passing the arguments by reference:
|
1 2 |
FUNCTION int SimpleFunc(REF string lastname, & REF my_str pbstr) LIBRARY "simple.dll" |
By default, PowerBuilder handles string arguments and return values as if they have Unicode…