PdcDatabase.OpenExternalQuery
Jump to navigation
Jump to search
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