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 – PB Docs 125 – PowerBuilder Library

DBErrorMessage – PB Docs 125

DBErrorMessage method (DataWindows)

Description

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

note.png 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.

Controls

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 Values

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


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