PdcApplication.LastError: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
Returns last errorstring | Returns last errorstring created by PdC. | ||
== Notes == | == Notes == | ||
Line 9: | Line 9: | ||
== Code example == | == Code example == | ||
This code example returns the error code of an incorrect SQL execute in PdC. | |||
<source lang="vb"> | |||
Sub sRunSQLStatement | |||
dim objQuery | |||
set objQuery = pdc.Database.OpenQuery(pdcConData) | |||
objQuery.SQL = "This is not a correct SQL statement" | |||
if objQuery.Execute then | |||
else | |||
msgbox pdc.LastError | |||
end if | |||
set objQuery = nothing | |||
End Sub | |||
</source> | </source> | ||
== Availability == | == Availability == | ||
Available since January 2002.(From version 2.7) | Available since January 2002.(From version 2.7) |
Latest revision as of 10:59, 31 July 2013
Declaration
LastError as String
Description
Returns last errorstring created by PdC.
Notes
Returns the last reported PdC error. Not set for all userexits though.
Code example
This code example returns the error code of an incorrect SQL execute in PdC.
Sub sRunSQLStatement
dim objQuery
set objQuery = pdc.Database.OpenQuery(pdcConData)
objQuery.SQL = "This is not a correct SQL statement"
if objQuery.Execute then
else
msgbox pdc.LastError
end if
set objQuery = nothing
End Sub
Availability
Available since January 2002.(From version 2.7)