SetOverlayJoinTable Method
Description
Sets a join between an overlay and a table.
Syntax
Visual Basic |
---|
Public Function SetOverlayJoinTable( _ ByVal pos As Integer, _ ByVal rs As String, _ ByVal formula As String, _ ByVal tablecolumn As String, _ ByVal bOneToMany As Integer _ ) As Integer |
Parameters
- pos
- The position of the overlay in the overlays list whose Tables are to be joined.
- rs
- A named recordset previously created using DefineRecordset.
- formula
- The expression to join from.
- tablecolumn
- The table column to join to.
- bOneToMany
-
If one column in a table is to relate to many columns in another table.
True/False
Remarks
The joined columns are not added to the overlay schema. It is up to the developer to add the schema columns they require.
Note: The Map Modeller wizard to join table offers the option to append columns to Schema or replace schema columns. See Table Joins - Joining a table to an overlay (Join Configuration dialog)
Available: GEO D OD OM OV SISpy
Groups:
Example
Connecting:
Dim sConnect As String
Dim sTables As String
Dim sColumns As String
Dim sAliases As String
sConnect = "ADO;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\Temp\AJoinTable.mdb"
sTables = "AJoinTable,AJoinTable"
sColumns = "ID,JOINID"
sAliases = "ID&,JOINID&"
sis.DefineRecordset("AJoinTable", sConnect, sTables, sColumns, sAliases, "")
sis.SetOverlayJoinTable(0, "AJoinTable", "_id&", "JOINID", True)
Refreshing:
sis.RefreshOverlayJoinTable(0)
Clearing:
sis.SetOverlayJoinTable(0, "", "", "", True)