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

OLE DB SQL functions – PB Docs 2021 – PowerBuilder Library

OLE DB SQL functions – PB Docs 2021

OLE DB SQL
functions

In SQL statements, you can use any function that your backend DBMS
supports (such as aggregate or mathematical functions). For example, if
your DBMS supports the function Sum, you can use the function Sum in a
SELECT statement:

Calling OLE DB functions

While PowerBuilder provides access to a large percentage of the
features within OLE DB, in some cases you might decide that you need to
call one or more OLE DB functions directly for a particular application.
PowerBuilder provides access to most Windows DLLs by using external
function declarations.

PowerBuilder OLE DB can export OLE DB data source objects or session
objects to users using the PowerScript function DBHandle. Users can create
their own session objects using the exported data source object, so they
can get a new independent connection that has connection properties
similar to those used by PowerBuilder OLE DB. With the exported session
object, users can also create their own command object that is under
PowerBuilder OLE DB’s transaction scope. The behavior is like using
DBHandle() with the PowerBuilder ODBC interface.

DBHandle

DBHandle takes a transaction object as a parameter and returns a
long variable, which is an interface pointer to a data source object or a
session object. By default PowerBuilder OLE DB exports a data source
object. If the DBParm “ReturnCommandHandle=1” is set, PowerBuilder OLE DB
exports a session object.

Example 1

This example illustrates how to use DBHandle to get an OLE DB data
source object. As with other examples, assume a successful connection has
occurred using the default transaction object (SQLCA).

Example 2

This example illustrates how to use DBHandle to get an OLE DB
session object.

With the IDBCreateCommand interface used by the PowerBuilder OLE DB
interface, you can create your own command object. Your command object and
the PowerBuilder command object will be in the same transaction
scope.

See also

OLE DB Using ODBC
escape Sequences


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