Tech Articles


Building an AI Text-to-SQL Translator in PowerBuilder (Text to SQL)


Introduction

Artificial Intelligence can greatly facilitate access to data, allowing non-technical users to query information naturally. PowerBuilder developers can integrate "Text-to-SQL" capabilities directly into their applications, enabling a dynamic query system powered by Large Language Models (LLMs).

This article demonstrates how to build a smart client in PowerBuilder (w_text_to_sql) that allows users to select a view structure, ask a question in natural language, and receive the results in a DataWindow, interacting in real-time with Google's Gemini 2.5 Flash Lite model via its REST API.

Read more

Building a Web RibbonBar with the WebBrowser Control in PowerBuilder


Introduction

The native RibbonBar control in PowerBuilder, although functional, presents significant limitations regarding visual customization, dynamic themes, and extensibility. With the arrival of the Chromium WebBrowser (WebView2) control in PowerBuilder 2019 R3+, the possibility opens up to build a Ribbon-type toolbar completely rendered in HTML/CSS/JavaScript, achieving a modern, responsive, and fully customizable appearance.

This article demonstrates how to build a reusable Web RibbonBar encapsulated in a User Object (u_wb_ribbon) that inherits from webbrowser. The component allows defining TabsGroups, and Buttons from pure PowerScript, serializing the structure to JSON, injecting it into the web DOM, and receiving back user click events — all using the native bidirectional communication of WebView2.

Read more

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

Find Articles by Tag

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