PdcDBQuery.SQL: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == SQL as String == Description == Returns the current SQL statement == Notes == This property presents the SQL statement. Till version 4.0 only SELECT state..."
 
No edit summary
 
Line 10: Line 10:


== Code example ==
== Code example ==
This code example executes a SQL statement and returns the SQL statement. 


<source lang="vb">
<source lang="vb">
Sub sExecuteQuery
dim objQuery
dim intCnt


  set objQuery = pdc.Database.OpenQuery(pdcConData)
  objQuery.SQL = "SELECT * FROM LK_KLANT"
  if objQuery.Execute then
    msgbox objQuery.SQL
  else
    msgbox "Error:" & vbCrLf & pdc.LastError & vbCrLf & vbCrLf & "SQL:" & vbCrLf & qryCustomer.SQL
  end if
End Sub
</source>
</source>


== Availability ==
== Availability ==
Available since September 2008 (from version 3.8)
Available since September 2008 (from version 3.8)

Latest revision as of 13:09, 31 July 2013

Declaration

SQL as String

Description

Returns the current SQL statement

Notes

This property presents the SQL statement. Till version 4.0 only SELECT statements are allowed. From version 4.0 onwards all SQL statements are supported.

Code example

This code example executes a SQL statement and returns the SQL statement.

Sub sExecuteQuery
dim objQuery
dim intCnt

  set objQuery = pdc.Database.OpenQuery(pdcConData)
  objQuery.SQL = "SELECT * FROM LK_KLANT"

  if objQuery.Execute then
    msgbox objQuery.SQL
  else
    msgbox "Error:" & vbCrLf & pdc.LastError & vbCrLf & vbCrLf & "SQL:" & vbCrLf & qryCustomer.SQL
  end if
End Sub

Availability

Available since September 2008 (from version 3.8)