Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a unique index for linked table 1

Status
Not open for further replies.

petecass

Programmer
Jul 30, 2004
19
GB
Hi,
Try with another question. When i refresh a link via code the unique index is deleted. Can anyone show me how to recreate the index on a linked table preferably with ado.

cheers
 
Code:
Private Sub NdxUsers()
    
    Dim strIndexSQL As String
    Dim cmd As New ADODB.Command
    strIndexSQL = "create unique index <indexObjectName> on LinkedTblName(UniqueColumnName)"
    With cmd
        .ActiveConnection = [Your Connection Info Here]
        .CommandText = strIndexSQL
        .Execute
    End With
    Set cmd = Nothing    
End Sub


Mark

&quot;You guys pair up in groups of three, then line up in a circle.&quot;
- Bill Peterson, a Florida State football coach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top