Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

DBErrorMessage (obsolete) – PB Docs 2019 – PowerBuilder Library

DBErrorMessage (obsolete) – PB Docs 2019

DBErrorMessage (obsolete)

Description

Reports the database-specific error message that triggered the
DBError event.

Obsolete method

DBErrorMessage is obsolete and will be discontinued in a future
release. You should replace all use of DBErrorMessage as soon as
possible. The database error message is available as an argument in the
DBError event.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild
object

Syntax

PowerBuilder

Argument

Description

dwcontrol

A reference to a DataWindow control or child
DataWindow

Return value

Returns a string whose value is a database-specific error message
generated by a database error in dwcontrol. Returns the empty string (“”)
if there is no error.

If dwcontrol is null, the method returns null.

Usage

When a database error occurs while a DataWindow control is
interacting with the database, PowerBuilder triggers the DBError event.
Since DBErrorMessage is meaningful only if a database error has occurred,
you should call this method only in the DBError event.

Examples

This statement returns the error message generated by a database
error in dw_employee:

Since this method is meaningful only in a DataWindow, you can use
the pronoun This instead of the DataWindow’s name:

If data processing fails in dw_Emp and these statements are coded in
the script for the DBError event, a message box containing the error
number and the message displays:

See also

DBErrorCode


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x