Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2002
    London, UK

    Unanswered: linking tables via ODBC

    I am programatically linking to tables in an oracle database via ODBC using the following code:

    DoCmd.TransferDatabase acLink, "ODBC Database", sConnString, acTable, "NEW_ERDF." & ReportsRS.Fields("LINK_TABLE_NAME"), "NEW_ERDF_" & ReportsRS.Fields("LINK_TABLE_NAME")

    sConnString is taken from the connection string of an existing linked table.

    My question is:

    How can I prevent the user from seeing the 'Select unique record identifier' window that pops up as the tables I am linking to are read only and therefore referential integrety does not matter. The user would just have to press OK without selecting any fields but this is not ideal.

    Any help gratefully received

  2. #2
    Join Date
    Jul 2002
    You could create a primary key in the Oracle table or couldn't you add "SetWarnings='False' " just prior to your acLink DoCmd?

  3. #3
    Join Date
    Nov 2004
    Creating a primary key works, killing the warnings does nothing. Someone else suggested using the sendkey command to shout an escape at the system - but I've had no luck with that, as the code will not run past the break point.

    I know this is an old post, but I'm having the same problem. Creating a primary key in the vFOX files that I'm working with isn't an option. Does anyone have any suggestions? Thanks.

    - Me

Posting Permissions

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