CodeItBetter Programming Another VB Programming Blog

How to link to an external Foxpro table.

Posted on July 5, 2011
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'Database - How to link to an external Foxpro table.
Sub Link_External()
    ' This procedure creates a new tabledef and links a FoxPro 3.0 table to it by
    ' setting the Connect and SourceTableName properties.

    Dim dbs As Database, tdf As TableDef
    Dim strPath As String
 
    Set dbs = OpenDatabase(strPath)
    ' Create a new tabledef in a Microsoft Jet database.
    Set tdf = dbs.CreateTableDef("Employees")
    ' Set the Connect and SourceTableName properties to link the tabledef.
    With tdf
        .Connect = "FoxPro 3.0;DATABASE=Path"
        .SourceTableName = "Emp"
    End With
    ' Append the linked tabledef.
    dbs.TableDefs.Append tdf
End Sub
Filed under: Database Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.