Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sqldmo
Message
De
08/08/2003 14:15:10
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Sqldmo
Divers
Thread ID:
00818353
Message ID:
00818353
Vues:
76
All,

Does anyone know how to add a primary key to a table using SQLDMO? When I try it with the code below the oTable.primarykey object = nothing. Any ideas would be great.

Here's the code,
Dim oKey As New SQLDMO.Key()
....
oKey.KeyColumns.Add(listFields.Items(I).Text)
oTable.PrimaryKey.Type = SQLDMO.SQLDMO_KEY_TYPE.SQLDMOKey_Primary
oTable.PrimaryKey.Clustered = False
oTable.PrimaryKey.KeyColumns.Add(oKey.KeyColumns.Item(0))
Thanks

Jim
Répondre
Fil
Voir

Click here to load this message in the networking platform