Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds a SyncSchemaForeignKey object to the end of the collection, with the specified constraint name, parent table and column, and child table and column.
Namespace: Microsoft.Synchronization.Data
Assembly: Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)
Syntax
'Declaration
Public Function Add ( _
foreignKeyName As String, _
parentTable As String, _
parentColumn As String, _
childTable As String, _
childColumn As String _
) As SyncSchemaForeignKey
'Usage
Dim instance As SyncSchemaForeignKeys
Dim foreignKeyName As String
Dim parentTable As String
Dim parentColumn As String
Dim childTable As String
Dim childColumn As String
Dim returnValue As SyncSchemaForeignKey
returnValue = instance.Add(foreignKeyName, _
parentTable, parentColumn, childTable, _
childColumn)
public SyncSchemaForeignKey Add(
string foreignKeyName,
string parentTable,
string parentColumn,
string childTable,
string childColumn
)
public:
SyncSchemaForeignKey^ Add(
String^ foreignKeyName,
String^ parentTable,
String^ parentColumn,
String^ childTable,
String^ childColumn
)
member Add :
foreignKeyName:string *
parentTable:string *
parentColumn:string *
childTable:string *
childColumn:string -> SyncSchemaForeignKey
public function Add(
foreignKeyName : String,
parentTable : String,
parentColumn : String,
childTable : String,
childColumn : String
) : SyncSchemaForeignKey
Parameters
- foreignKeyName
Type: System.String
The name of the foreign key constraint.
- parentTable
Type: System.String
The name of the parent table.
- parentColumn
Type: System.String
The name of the primary key or unique column in the parent table.
- childTable
Type: System.String
The name of the child table.
- childColumn
Type: System.String
The name of the foreign key column in the child table.
Return Value
Type: Microsoft.Synchronization.Data.SyncSchemaForeignKey
The SyncSchemaForeignKey object that was added to the collection.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | parentTable, parentColumn, childTable, or childColumn does not belong to the current data set. |