Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820

    Unanswered: is there a simple method getting a 1 way link to odbc

    basicaly i want 1 of the following 2 option but i cant find the details of how to do it

    1 a linked table that reads but can't write (and access don't kill itself trying to deligate commands ODBC can't haddle to it)

    2 a straight import that automated

    prefer option 1 but 2 will work
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  2. #2
    Join Date
    Jan 2003
    Location
    Aberdeen, Scotland, UK
    Posts
    168

    Re: is there a simple method getting a 1 way link to odbc

    Maybe being thick, but....

    Can you link the table and then change the securities to allow only read access?

    John

  3. #3
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    that would depend on what you ment by securities, if you mean changing the odbc databases access privalages to read only, definatly not but if you mean changing the nature of the link that is what i'm trying to find out
    Originally posted by johncameron
    Maybe being thick, but....

    Can you link the table and then change the securities to allow only read access?

    John
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  4. #4
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    okay i've hacked a solution

    Sub ImportTables()
    With DoCmd
    .TransferDatabase acImport, "ODBC", "ODBC;DSN=LIVE_DATA;SRV=LIVE_DATA;DBQ=LIVE_DATA;UI D=ODBC;;TABLE=Administrators.CUSTS_NF", acTable, "Administrators.CUSTS_NF", "CUST", False
    .TransferDatabase acImport, "ODBC", "ODBC;DSN=LIVE_DATA;SRV=LIVE_DATA;DBQ=LIVE_DATA;UI D=ODBC;;TABLE=Administrators.BOMDATA_DER", acTable, "Administrators.BOMDATA_DER", "BOM1", False
    .TransferDatabase acImport, "ODBC", "ODBC;DSN=LIVE_DATA;SRV=LIVE_DATA;DBQ=LIVE_DATA;UI D=ODBC;;TABLE=Administrators.BOMDATA_NF", acTable, "Administrators.BOMDATA_NF", "BOM2", False
    .TransferDatabase acImport, "ODBC", "ODBC;DSN=LIVE_DATA;SRV=LIVE_DATA;DBQ=LIVE_DATA;UI D=ODBC;;TABLE=Administrators.INVHIST_DER", acTable, "Administrators.INVHIST_DER", "INV1", False
    .TransferDatabase acImport, "ODBC", "ODBC;DSN=LIVE_DATA;SRV=LIVE_DATA;DBQ=LIVE_DATA;UI D=ODBC;;TABLE=Administrators.INVHIST_NF", acTable, "Administrators.INVHIST_NF", "INV2", False
    .SetWarnings False
    .RunSQL "INSERT INTO Bom ( ID, PPart, CPart, CDes, QTYPA, ENGUOM ) SELECT BOM1.ID, BOM1.PPART, BOM1.CPART, BOM1.CDES, BOM2.QTYPA, BOM2.ENGUOM FROM BOM1 INNER JOIN BOM2 ON BOM1.ID = BOM2.ID;"
    .RunSQL "INSERT INTO InvHist ( ACCT_NO, CR_TYPE, ICEDATE, INVOICE, I_TYPE, NET_EXTP, PROD_GRP, SHIP_TO, ITEMNBR, SHIPQTY, WHSE ) SELECT INV1.ACCT_NO, INV1.CR_TYPE, INV1.ICEDATE, INV1.INVOICE, INV1.I_TYPE, INV1.NET_EXTP, INV1.PROD_GRP, INV1.SHIP_TO, INV2.ITEMNBR, INV2.SHIPQTY, INV2.WHSE FROM INV1 INNER JOIN INV2 ON INV1.ID = INV2.ID;"

    .setwarning True
    End With
    End Sub

    now this loses the cust primary key is there a way of putting it back?
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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