Advpl Embedded Sql (Grade A) logo

Advpl Embedded Sql (Grade A)Security-tested development skill for Claude AI. Grade A. SQL embarcado em ADVPL/TLPP — BeginSql/EndSql (preferido), TCQuery (legacy), TCSqlExec (DML), MPSysOpenQuery (autosetfield). Macros obrigatóri

(0)
Daniel NikulshynReviewed by Daniel Nikulshyn·Updated July 2026

Overview

ADVPL Embedded SQL is a skill for developing security-tested SQL queries directly within ADVPL/TLPP code. It supports native SQL with macro substitutions that ensure multi-company, multi-branch, anti-SQL-injection, and portability across various DBMS like Oracle, SQL Server, Postgres, and DB2 via DBAccess. The primary method for embedding SQL is through BeginSql/EndSql macros, with TCQuery and TCSqlExec being legacy or specific-use alternatives. Macros such as %notDel%, %xfilial%, %table%, %exp%, %Order%, %top%, and %LIMIT% are required for safe and dynamic query construction. This approach helps in refactoring legacy TCQuery and improving code performance while adhering to specific lint rules for security and efficiency.

Key features

  • Native SQL support in ADVPL/TLPP
  • Macro substitution for dynamic queries
  • Anti-SQL-injection protection
  • DBMS portability
  • Support for DML/DDL operations
  • Integration with lint rules for code quality

Pricing

Model
Free
Category
Skills
Rating
No reviews yet

Use cases

Embedded Query Construction

Use BeginSql/EndSql macros to construct SQL queries directly within ADVPL/TLPP code for improved performance and security.

Legacy TCQuery Refactoring

Refactor legacy TCQuery and concatenated SQL constructions to BeginSql/EndSql for better maintainability and security.

DML Operations

Utilize TCSqlExec for mass DML operations like updates and inserts to improve performance and simplify code.

Pros & Cons

Pros

  • Ensures SQL-injection protection
  • Supports multi-company and multi-branch operations
  • Portable across different DBMS
  • Improves code performance and security
  • Simplifies query construction and refactoring

Cons

  • Requires specific macro usage for safety and portability
  • Steep learning curve for beginners in ADVPL/TLPP
  • Legacy methods like TCQuery still in use

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Q&A

Is it easy to learn?

The tool has a steep learning curve for beginners in ADVPL/TLPP, requiring specific macro usage for safety and portability.

Asked by Chidi Okonkwo · Aug 17, 2025

What are the required macros?

Macros like %notDel%, %xfilial%, %table%, %exp%, %Order%, %top%, and %LIMIT% are required for safe and dynamic query construction.

Asked by Joanna Kowalski · Aug 11, 2025

How does it prevent SQL injection?

The tool uses macro substitutions, such as %notDel% and %xfilial%, to ensure anti-SQL-injection protection and safe query construction.

Asked by Wesley Adekunle · May 11, 2025

What DBMS are supported?

The tool supports Oracle, SQL Server, Postgres, and DB2 via DBAccess, ensuring portability across various databases.

Asked by Elena Rossi · Apr 27, 2025

Ask a question

Skills alternatives

Manage Headers (Grade A) logo
Manage Headers (Grade A)Skills

Security-tested development skill for Claude AI. Grade A. Inspects and configures the security headers a Power Pages site sends to browsers — Content Security Policy, frame and clickjacking protection

(0)
Free
Using Git Worktrees (Grade A) logo
Using Git Worktrees (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktre

(0)
Free
Ga4 Bigquery Schema (Grade A) logo
Ga4 Bigquery Schema (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. GA4 BigQuery Export Schema Reference — complete field reference, nested structures, query patterns, and performance tips

(0)
Free
Meta Capi (Grade A) logo
Meta Capi (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. Meta Conversions API (CAPI) Setup Reference — architecture, event types, customer information hashing, deduplication, implementation examples, AEM

(0)
Free
Callees (Grade A) logo
Callees (Grade A)Skills

Security-tested development skill for Claude AI. Grade A. Lista o que uma funcao/metodo chama (call graph direto)

(0)
Free
Test Module Name (Grade A) logo
Test Module Name (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. Name Haskell test modules after the module under test with a Spec suffix in the same namespace. Use when writing or reviewing Haskell test module

(0)
Free
Board Of Directors (Grade A) logo
Board Of Directors (Grade A)Skills

Security-tested data-ai skill for Claude AI. Grade A. Simulate a 5-member expert board deliberation for major decisions. Use when evaluating plans, architecture choices, feature designs, or any decisi

(0)
Free
Advpl Mvc Avancado (Grade A) logo
Advpl Mvc Avancado (Grade A)Skills

Security-tested development skill for Claude AI. Grade A. MVC avançado via PE (Pontos de Entrada) — adicionar grids customizadas em telas MVC padrão (CNTA300/MATA070/MATA440/MATA460/FINA040 via *STRU)

(0)
Free