Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Using Oracle user-defined types – PB Docs 2022 – PowerBuilder Library

Using Oracle user-defined types – PB Docs 2022

Using Oracle user-defined types

PowerBuilder supports SQL CREATE TYPE and CREATE TABLE statements
for Oracle user-defined types (objects) in the ISQL view of the Database
painter. It correctly handles SQL SELECT, INSERT, UPDATE, and DELETE
statements for user-defined types in the Database and DataWindow
painters.

This means that using the Oracle native database interfaces in
PowerBuilder, you can:

Do this

In

Use Oracle syntax to create user-defined
types

Database painter

Use Oracle syntax to create tables with columns that
reference user-defined types

Database painter

View columns in Oracle tables that reference
user-defined types

Database painter

Manipulate data in Oracle tables that have
user-defined types

Database painter

DataWindow
painter

DataWindow objects

Export Oracle table syntax containing user-defined
types to a log file

Database painter

Invoke methods

DataWindow object painter (Compute tab in SQL
Toolbox)

Example

Here is a simple example that shows how you might create and use
Oracle user-defined types in PowerBuilder.

For more information about Oracle user-defined types, see your
Oracle documentation.

To create and use Oracle user-defined types:

  1. In the ISQL view of the Database painter, create two Oracle
    user-defined types: ball_stats_type and player_type.

    Here is the Oracle syntax to create ball_stats_type. Notice that
    the ball_stats object of type ball_stats_type has a method associated
    with it called get_avg.

    Here is the Oracle SQL syntax to create player_type. Player_type
    references the user-defined type ball_stats_type. PowerBuilder
    supports such nesting graphically in the Database, DataWindow, and
    Table painters (see step 3).

  2. In the Database painter, create a table named lineup that
    references these user-defined types.

    Here is the Oracle SQL syntax to create the lineup table and
    insert a row. Lineup references the player_type user-defined
    type.

  3. Display the lineup table in the Database or DataWindow
    painter.

    PowerBuilder uses the following structure->member notation to
    display the table:

  4. To access the get_avg method of the object ball_stats contained
    in the object column player, use the following structure->member
    notation when defining a computed column for the DataWindow object.
    For example, when working in the DataWindow painter, you could use
    this notation on the Compute tab in the SQL Toolbox:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x