PdcDatabase.OpenExternalQuery: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Declaration == OpenExternalQuery(ServerIP as String, Port as Integer, DBName as String) as PdcDBQuery == Description == Return a IDBQuery for execution == Notes == T..." |
|||
Line 11: | Line 11: | ||
<source lang="vb"> | <source lang="vb"> | ||
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 | |||
</source> | </source> | ||
== Availability == | == Availability == | ||
Available from version 5.5 | Available from version 5.5 |
Revision as of 10:45, 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.
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