473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Jun 27 '08 #1
2 1891
JvC
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.activeconnection = myadodbconnection
cmd.commandtext = "drop myindex on mydatabase.mytable
cmd.Execute

John

<c.********@googlemail.comwrote in message
news:0f**********************************@z66g2000 hsc.googlegroups.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

Jun 27 '08 #2
On Jun 14, 11:27*am, "c.a.due...@googlemail.com"
<c.a.due...@googlemail.comwrote:
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 ?
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steve Perry | last post by:
Hi, I have a large FoxPro table with an index that I need to be Queried from SQL Server by OLE.DB or ODBC. If I query the DBF directly a search takes 1 Minute +. Is there a way I can call the...
5
by: Sid | last post by:
Hi, I was going through this reference code and playing around with it. The code (shown below) shows a class that represents a stack of string pointers In the code below in particular in the...
35
by: Jon Slaughter | last post by:
I'm having a problem allocating some elements of a vector then deleting them. Basicaly I have something like this: class base { private: std::vector<object> V;
3
by: Richard Marsden | last post by:
Here's another strange error I'm getting when using ODBC to access MySQL. This time ODBC is being more informative, although all the documentation I've looked at, claims that the function in...
5
by: php coder | last post by:
Sorry, this is simple... but i'm going cross-eyed trying to find the error: This code: $delete_query = "DELETE FROM $tablename WHERE index = '$index'"; if($delete){ mysql_query($delete_query) ...
0
by: sujith | last post by:
hi, if i use to set the primary key of table some error arises , like this one. Contact_Table' table - Unable to create index 'PK_Contact_Table'. ODBC error: CREATE UNIQUE INDEX terminated...
7
by: ITAutobot25 | last post by:
My delete button is not working in my GUI and my due date is today before midnight. Can anyone show me how to correct this error? My assignment statement is below as well as 5 classes. InventoryGUI...
2
by: MLH | last post by:
Am using A97. Have defined Machine Data Source type DSNs in Access' File, Get External Data, Link Tables, Files of Type ODBC, Machine Data Source tab. Have many definitions. Would like to delete...
1
by: Bobby | last post by:
Hi I am using Access 2003 mdb as a front end to an application which uses SQL Server 2000 as the backend. The two are connected using ODBC. On one particular table (the Stock table), I have a...
2
by: William LaMartin | last post by:
On webform, I am populating a GridView from a SQLDatasource based on a MySQL table named PIB. There is no vb code involved. Everything is done in the source for the aspx page, provided below. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.