PdcDatabase.OpenExternalQuery: Difference between revisions
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
== Notes == | == Notes == | ||
This method opens a query for a specified SQL statement to another PdC environment. | This method opens a query for a specified SQL statement to another PdC environment. | ||
Please pay attention! | |||
Parameters are case sensitive | |||
== Code example == | == Code example == |
Latest revision as of 10:47, 24 February 2020
Declaration
OpenExternalQuery(ServerIP as String, Port as Integer, DBName as String) as PdcDBQuery
Description
Return a IDBQuery for execution
Notes
This method opens a query for a specified SQL statement to another PdC environment.
Please pay attention! Parameters are case sensitive
Code example
Dim qryRemote As PDCEXT.IDBQuery = PDC.App.Database.OpenExternalQuery("127.0.0.1", 5432, "pdc55")
If Not IsNothing(qryRemote) Then
qryRemote.SQL = $"select * from lk_klant where kl_debnr = '000028'"
If qryRemote.Execute Then
MsgBox(qryRemote.GetStr("kl_naam"))
Else
MsgBox(PDC.App.LastError)
End If
End If
Availability
Available from version 5.5