Tech Articles


Building a RAG (Retrieval-Augmented Generation) System with PowerBuilder


Introduction

Artificial Intelligence is transforming enterprise software development. PowerBuilder developers can now integrate Retrieval-Augmented Generation (RAG) capabilities directly into their applications, enabling an intelligent question-and-answer system based on documents, powered by Large Language Models (LLMs).

This article demonstrates how to build a complete RAG client in PowerBuilder that connects to a Python-based backend with FastAPI. The system allows users to ingest documents, query them using natural language, and receive AI-generated responses with citations to the sources — all rendered in a professional HTML interface using the Chromium WebBrowser control.

Read more

PowerBuilder Equivalents to Windows API Datatypes


At some point in your PowerBuilder career, you will need to call a Windows API (or WinAPI, for short) function. The WinAPI specifications are heavily dependent on type definitions created in C/C++ via the #define preprocessor directive. The use of type defintions helps the readability of Windows code, but it unfortunately and effectively hides the actual underlying datatype - making it difficult for you to correctly code the PowerBuilder external function declaration needed to call the API function.

Some time ago I published a four-part series of PowerBuilder tutorials that explain the ins and outs of interfacting PowerBuilder apps with the Windows API, but I realize the many developers are very busy and do not have the luxury of sufficient spare time needed to read that much material. In case you are interested and have the time, I have included URLs to those tutorials at the end of this article.

This article consists of two tables. The first table lists many of the most commonly-seen WinAPI type definitions and their PowerBuilder equivalents. The second table lists the PowerBuilder datatypes and their WinAPI equivalents, if any. For your convenience, I am also providing the URLs to several useful resources you may find helpful when coding external function declarations.

Read more

PBNI Extension Framework


Addressing the complexities of PBNI

PowerBuilder Native Interface (PBNI) allows developers to extend the capabilities of PowerBuilder by implementing features in C++ or using third-party libraries. However, the traditional process for creating these extensions can be cumbersome.

For a simple sum function with 9 lines of code...

... you have to write 63 lines of code just to make it callable from PowerBuilder and for every change, you have to make PB-specific modifications in three files:

Read more

How to switch from an SCC API SVN client to the native SVN interface


If you have been using the Subversion (SVN) source code control system for your PowerBuilder applications for a while, you have likely been using an SCC API implementation client (such as PBSCC Proxy, PushOK, etc.) to connect PowerBuilder to SVN. If you are considering switching to the native SVN interface provided by PowerBuilder then you probably do not want to lose the history of all the changes you made during all those years of development. Although this is not covered in the PowerBuilder documentation, it is relatively simple to do.

Read more

PowerBuilder Icons


Update on 23-OCT-2024:  The icons have apparently been moved to a new home:

https://www.appeon.com/sites/default/files/pictures/Downloads/CodeSample/PB10_Icons.zip

https://www.appeon.com/sites/default/files/pictures/Downloads/CodeSample/Silk Icons.zip

https://www.appeon.com/sites/default/files/pictures/Downloads/CodeSample/WinXP Icons.zip

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Earlier, one of our members asked about obtaining a set of the PB Classic icons. I've got those, along with two other sets of Icons available for your use. These icons sets are:

 - PB 10 icons

 - the Silk icons

 - the WinXP icons

Read more

Tile Menu Style using Datawindow Object


Updated sample with added features from pbdev.id blog

Have you ever wanted Windows Tile Menu Style on your application? this datawindow object can give you way to have it.
Just add row data to set Image, Text and size of the tile.

Read more

REST Enhancements in PowerBuilder 2019


REST support was added to PowerBuilder in 2017 R2 and enhanced in 2017 R3.  PowerBuilder 2019 contains additional significant enhancements to REST support, including the following:

  • RetrieveOne method – For REST methods return one row
  • Submit method - sends request and returns data in one operation
  • SetRequestHeader behavior modified
  • GZIP compression handled automatically
  • Send[Method]Request, where method can be Get, Put, Post, Patch, Delete
  • Get and Set OAuth token methods
  • Get and set JWT token methods

 

Read more

Find Articles by Tag

PowerBuilder (Appeon) Script JSONParser PowerScript (PS) Messagging Elevate Conference UI PostgreSQL OrcaScript Windows 10 Icons Encryption SQL Server Bug Encoding DevOps PowerBuilder Compiler Array Filter SqlModelMapper RichTextEdit Control Authentication Export JSON Mobile WebBrowser Source Code InfoMaker Event Handler Database Painter .NET Std Framework Installation Database Table Data Transaction Visual Studio TLS/SSL Import Debugging Design UI Themes .NET DataStore REST WinAPI Configuration RESTClient CI/CD Azure ODBC Event Handling License Git UI Modernization OAuth Resize Open Source Outlook RibbonBar Builder PowerServer Web JSONGenerator Database Table SVN SDK DataWindow JSON SqlExecutor Linux OS Variable DataWindow Window C# Menu Database Profile GhostScript Database OAuth 2.0 32-bit Windows OS TortoiseGit Export Expression Text Trial Web Service Proxy Repository Import JSON PowerBuilder Deployment Application Validation Performance PowerServer Mobile SnapDevelop Excel PDF Testing PFC Oracle PBDOM Automated Testing TFS Service Syntax NativePDF ActiveX File Jenkins Database Connection Source Control Debug External Functions Icon iOS Branch & Merge IDE HTTPClient OLE Platform COM PBVM Error PDFlib Stored Procedure API Migration Database Table Schema Sort Graph Database Object Event MessageBox Interface SnapObjects JSON Class SOAP TreeView Charts Debugger SQL Android .NET Assembly DragDrop Web API PostgreSQL ODBC driver CoderObject DLL RibbonBar PBNI CrypterObject XML Data DataType Authorization 64-bit BLOB Model