AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

indexes in MsAccess

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
hilz
Guest





PostPosted: Mon Dec 13, 2004 10:30 pm    Post subject: indexes in MsAccess Reply with quote



Hi all. i know this is not directly related to java databases, but i thought
this might be a good place to ask.
I have a table in MsAccess that i created as follows:
create table ITEM (
ITEM_ID COUNTER PRIMARY KEY,
ITEM_NAME CHAR(255) UNIQUE,
ITEM_DESCRIPTION CHAR(255)
)

I need to drop the unique index on the ITEM_NAME, and i don't know its name.
so how would i do that(using SQL).
is there a way to get the names of all indexes on the table ITEM, and select
the one i want?
or is there another way to do that?

thank you for any help.
hilz




Back to top
hilz
Guest





PostPosted: Wed Dec 15, 2004 6:10 pm    Post subject: Re: indexes in MsAccess Reply with quote



"Noel" <no.spam (AT) thank (DOT) you> wrote

Quote:
On Mon, 13 Dec 2004 17:30:19 -0500, "hilz" <no.w@y.com> wrote:

Hi all. i know this is not directly related to java databases, but i
thought
this might be a good place to ask.
I have a table in MsAccess that i created as follows:
create table ITEM (
ITEM_ID COUNTER PRIMARY KEY,
ITEM_NAME CHAR(255) UNIQUE,
ITEM_DESCRIPTION CHAR(255)
)

I need to drop the unique index on the ITEM_NAME, and i don't know its
name.
so how would i do that(using SQL).
is there a way to get the names of all indexes on the table ITEM, and
select
the one i want?
or is there another way to do that?

It is not really the place for this question, but here goes anyway.

ALTER TABLE ITEM ALTER COLUMN ITEM_NAME CHAR(255);



Noel:
I appreciate your help. Your suggestion did not really get rid of that
un-named index.

I even tried to recreate a new unique index and give it a name, and then
drop that index, thinking that when i do that, it will replace the existing
unnamed one, but that did not work either. this is what i did:

ALTER TABLE ITEM ALTER COLUMN ITEM_NAME CHAR(255) CONSTRAINT UNIQUENAME1
UNIQUE;

DROP INDEX UNIQUENAME1 ON ITEM;

the old un-named unique index still existed.
any other ideas?
thank you
hilz



Back to top
Evelyn V Stevens
Guest





PostPosted: Fri Dec 17, 2004 10:12 pm    Post subject: Re: indexes in MsAccess Reply with quote




Hi,

The un-named index -probably- defaulted to the column name. If that
doesn't work in your ALTER TABLE statement, see whether you can find the
name by using the Documenter in Access:

Tools
Documenter
Tables (select only the table in question)
Options (turn off all options (set to None) except Names and
Properties under Indexes - otherwise the documenter
returns way too much data)

Hope this helps,

Evelyn
--
Evelyn V. Stevens, Ph.D. E-mail: [email]evelyn (AT) udel (DOT) edu[/email]
Information Technologies-User Services
U. of Delaware, Newark, DE 19716 Phone: 302-831-4240
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.