PdcApplication.LastError: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability =="
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Declaration ==
== Declaration ==
LastError as String


== Description ==
Returns last errorstring created by PdC.


== Description ==
== 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.


== Notes ==
<source lang="vb">
Sub sRunSQLStatement
dim objQuery


  set objQuery = pdc.Database.OpenQuery(pdcConData)


== Code example ==
  objQuery.SQL = "This is not a correct SQL statement"


  if objQuery.Execute then


<source lang="vb">
  else
    msgbox pdc.LastError
  end if


  set objQuery = nothing
End Sub
</source>
</source>


== Availability ==
== Availability ==
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)