ChatGPT shows this:
SQLGetDiagRec(
SQL_HANDLE_STMT, // statement handle
hstmt,
iRecord, // record number, starting at 1
SqlState,
&NativeError,
MessageText,
BufferLength,
&TextLengthPtr
);
Notices will have:
-
SqlState = "00000"
-
NativeError = 0
-
MessageText = "<your NOTICE text>"
Dave Cramer
www.postgres.rocks
On Sun, 30 Nov 2025 at 02:58, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
> Hi, ALL,
> How do I do that?
>
> Google showed only the libpq way...
>
> Thank you.
>
>
>