Using Embedded SQL with OLE DB

About this chapter

When you create scripts for a PowerBuilder application, you can use embedded SQL statements in the script to perform operations on the database. The features supported when you use embedded SQL depend on the DBMS to which your application connects.


When you use the PowerBuilder OLE DB interface to connect to a backend database, you can use embedded SQL in your scripts.

You can embed the following types of SQL statements in scripts and user-defined functions if the OLE DB driver you are using and the backend DBMS you are accessing supports this functionality. (Not all backend databases support cursor statements and database stored procedures.)

  • Transaction management statements

  • Non-cursor statements

  • Cursor statements

  • Database stored procedures

OLE DB Programming Models

OLE DB is a set of COM (Component Object Model) interfaces that provide uniform access to data stored in multiple, diverse data sources. These data sources also enable applications to provide additional database services.

When you use embedded SQL, PowerBuilder makes the required calls to the backend database. Therefore, you do not need to know anything about the OLE DB interface to use embedded SQL with PowerBuilder.

See also

Using the OLE DB Interface

OLE DB SQL support

OLE DB Transaction management statements

OLE DB Non-cursor statements

OLE DB Cursor statements

OLE DB Database stored procedures