Add méthode (String, String, String[], String, String )
Ajoute un objet SyncSchemaForeignKey à la fin de la collection, avec le nom de contrainte, la table et les colonnes parentes, ainsi que la table et les colonnes enfant spécifiés.
Espace de noms : Microsoft.Synchronization.Data
Assembly : Microsoft.Synchronization.Data (dans Microsoft.Synchronization.Data.dll)
Syntaxe
'Déclaration
Public Function Add ( _
foreignKeyName As String, _
parentTable As String, _
parentColumns As String(), _
childTable As String, _
childColumns As String() _
) As SyncSchemaForeignKey
'Utilisation
Dim instance As SyncSchemaForeignKeys
Dim foreignKeyName As String
Dim parentTable As String
Dim parentColumns As String()
Dim childTable As String
Dim childColumns As String()
Dim returnValue As SyncSchemaForeignKey
returnValue = instance.Add(foreignKeyName, _
parentTable, parentColumns, childTable, _
childColumns)
public SyncSchemaForeignKey Add(
string foreignKeyName,
string parentTable,
string[] parentColumns,
string childTable,
string[] childColumns
)
public:
SyncSchemaForeignKey^ Add(
String^ foreignKeyName,
String^ parentTable,
array<String^>^ parentColumns,
String^ childTable,
array<String^>^ childColumns
)
member Add :
foreignKeyName:string *
parentTable:string *
parentColumns:string[] *
childTable:string *
childColumns:string[] -> SyncSchemaForeignKey
public function Add(
foreignKeyName : String,
parentTable : String,
parentColumns : String[],
childTable : String,
childColumns : String[]
) : SyncSchemaForeignKey
Paramètres
- foreignKeyName
Type : System. . :: . .String
Nom de la contrainte de clé étrangère.
- parentTable
Type : System. . :: . .String
Nom de la table parent.
- parentColumns
Type : array<System. . :: . .String> [] () [] []
Tableau des colonnes de la clé primaire ou uniques dans la table parent.
- childTable
Type : System. . :: . .String
Nom de la table enfant.
- childColumns
Type : array<System. . :: . .String> [] () [] []
Tableau des colonnes de la clé étrangère dans la table enfant.
Valeur de retour
Type : Microsoft.Synchronization.Data. . :: . .SyncSchemaForeignKey
Objet SyncSchemaForeignKey qui a été ajouté à la collection.
Exceptions
Exception | Condition |
---|---|
ArgumentException |
—ou—
|