How to delete index on odbc-linked database?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • c.a.duevel@googlemail.com

    How to delete index on odbc-linked database?

    Hello!

    I have a really weird problem, here:

    I'll have to link tables of a sql server 2005 database to an access
    2003 database.
    This works without a problem, but those linked tables get up to five
    (!) primary keys -
    NONE of them is defined as a primary key in the server database.

    I tried anything I could think of in DAO and ADO, to delete those keys
    - without any success.
    Has somebody ever done this and knows how it is possible?

    Any help is appreciated!

    Thanks a bunch,

    Carl
  • JvC

    #2
    Re: How to delete index on odbc-linked database?

    You need to use an ADO command object to execute the SQL on the server. You
    have to have administrator rights to drop an index.

    If I remember correctly it goes something like:

    set cmd = New adodb.command
    set md.connnection. activeconnectio n = myadodbconnecti on
    cmd.commandtext = "drop myindex on mydatabase.myta ble
    cmd.Execute

    John

    <c.a.duevel@goo glemail.comwrot e in message
    news:0f255353-96cf-4bdc-89a5-0ee299f4901d@z6 6g2000hsc.googl egroups.com...
    Hello!
    >
    I have a really weird problem, here:
    >
    I'll have to link tables of a sql server 2005 database to an access
    2003 database.
    This works without a problem, but those linked tables get up to five
    (!) primary keys -
    NONE of them is defined as a primary key in the server database.
    >
    I tried anything I could think of in DAO and ADO, to delete those keys
    - without any success.
    Has somebody ever done this and knows how it is possible?
    >
    Any help is appreciated!
    >
    Thanks a bunch,
    >
    Carl

    Comment

    • Roger

      #3
      Re: How to delete index on odbc-linked database?

      On Jun 14, 11:27 am, "c.a.due...@goo glemail.com"
      <c.a.due...@goo glemail.comwrot e:
      Hello!
      >
      I have a really weird problem, here:
      >
      I'll have to link tables of a sql server 2005 database to an access
      2003 database.
      This works without a problem, but those linked tables get up to five
      (!) primary keys -
      NONE of them is defined as a primary key in the server database.
      >
      I tried anything I could think of in DAO and ADO, to delete those keys
      - without any success.
      Has somebody ever done this and knows how it is possible?
      >
      Any help is appreciated!
      >
      Thanks a bunch,
      >
      Carl
      so you have an sql table with just one primary key, and when you link
      it in access, you more than one primary key ?
      or do you get the same primary key and some indexes ?

      Comment

      Working...