Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    3

    Unanswered: CreateTableDef and Unique Record Identifier

    When I link a foxpro 2.5 table using CreateTableDef, it creates a read only link. If I add the link from Access it promts me to select the Unique Record Identifier. Is there a way to select this in my program?

    Set tbl = db.CreateTableDef("employee", 0,"employee"), "odbc;dsn=fox
    db.TableDefs.Append tbl

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    You should look at the TransferDatabase method of the DoCmd object. It should do what you want.

  3. #3
    Join Date
    Feb 2004
    Posts
    3
    I need to link the table, not import the table. also I need to do this from Visual Basic code.

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    This method allows you to link to the table. Here is a quick exampl;e

    DoCmd.TransferDatabase acLink, "FoxPro 2.5", strPath, acTable, strFilename, strTableName

    You should be able to find out more about the parameters in the help. I have found it helpful to writ ea macro to do it, then use the macro to help you with the parameters in the VBA code. It can be a little confusing when you are trying to determine the source and destinations because the same method is used to Import Link and Export a table or file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •