473,394 Members | 1,806 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,394 software developers and data experts.

Database Index

Hi all -

I'm trying to build a small Access Database (that came with VB5) - I'd like
the database records sorted and displayed by date (which it does - date is
an indexed field) but if I have one record with a certain date and try to
input another one with the same date I get an error message...I'm assuming
the program doesn't know how to sort two fields containing the exact same
information?

Any help will be appreciated...

Thanks - John
Jul 17 '05 #1
4 2178
It sounds like you have put a unique index on the date field rather than an
index.

Check the index type.

"John" <jo********@yahoo.com> wrote in message
news:dz*************@newsread4.news.pas.earthlink. net...
Hi all -

I'm trying to build a small Access Database (that came with VB5) - I'd like the database records sorted and displayed by date (which it does - date is
an indexed field) but if I have one record with a certain date and try to
input another one with the same date I get an error message...I'm assuming
the program doesn't know how to sort two fields containing the exact same
information?

Any help will be appreciated...

Thanks - John

Jul 17 '05 #2
Thanks for the response...

Yes, the 'unique' field was checked - but I haven't checked it. In fact,
while setting up the index field for date, I unchecked the unique box but
when I hit add index the unique field is being automatically checked again
and it won't let me uncheck it... ?

I need the db sorted by date and there may be several records for a single
date -

Ideas?

John

"cor_blimey" <sh******@ntlworld.com> wrote in message
news:IG**************@newsfep1-gui.server.ntli.net...
It sounds like you have put a unique index on the date field rather than an index.

Check the index type.

"John" <jo********@yahoo.com> wrote in message
news:dz*************@newsread4.news.pas.earthlink. net...
Hi all -

I'm trying to build a small Access Database (that came with VB5) - I'd

like
the database records sorted and displayed by date (which it does - date is an indexed field) but if I have one record with a certain date and try to input another one with the same date I get an error message...I'm assuming the program doesn't know how to sort two fields containing the exact same information?

Any help will be appreciated...

Thanks - John


Jul 17 '05 #3
If the field is a key field, it will need the unique setting. The only way
to be able to take of the unique setting is to turn the field off as a key
field.

Sue
"John" <jo********@yahoo.com> wrote in message
news:t%*************@newsread4.news.pas.earthlink. net...
Thanks for the response...

Yes, the 'unique' field was checked - but I haven't checked it. In fact,
while setting up the index field for date, I unchecked the unique box but
when I hit add index the unique field is being automatically checked again
and it won't let me uncheck it... ?

I need the db sorted by date and there may be several records for a single
date -

Ideas?

John

"cor_blimey" <sh******@ntlworld.com> wrote in message
news:IG**************@newsfep1-gui.server.ntli.net...
It sounds like you have put a unique index on the date field rather than an
index.

Check the index type.

"John" <jo********@yahoo.com> wrote in message
news:dz*************@newsread4.news.pas.earthlink. net...
Hi all -

I'm trying to build a small Access Database (that came with VB5) - I'd

like
the database records sorted and displayed by date (which it does -
date is an indexed field) but if I have one record with a certain date and try to input another one with the same date I get an error message...I'm assuming the program doesn't know how to sort two fields containing the exact same information?

Any help will be appreciated...

Thanks - John



Jul 17 '05 #4
"John" <jo********@yahoo.com> wrote in message news:<t%*************@newsread4.news.pas.earthlink .net>...
Thanks for the response...

Yes, the 'unique' field was checked - but I haven't checked it. In fact,
while setting up the index field for date, I unchecked the unique box but
when I hit add index the unique field is being automatically checked again
and it won't let me uncheck it... ?

I need the db sorted by date and there may be several records for a single
date -

Ideas?

John


John,

I hate to rock the boat, but a table is by definition unsorted. If
you want to order your records, use a query.

SELECT MT1.Field1, MT2.Field2, MT2.Field3...
FROM MyTable1 AS MT1 INNER JOIN MyTable2 AS MT2 ON
MyTable1.Field1=MyTable2.Field2
ORDER BY MT1.Field1, MT2.Field2...

otherwise, you'll need to index on the fields you want sorted by...
kind of a waste of time, unless you're going to sort/query on those
fields a lot.
Jul 17 '05 #5

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

Similar topics

8
by: Greg | last post by:
Hello, I've to manage many 'table' (having same scheme) on the same server. And I ask myself what could be the best to do (and if you know, why) : Creating as many database (the name would...
10
by: Stephen | last post by:
Hello, Is it normal for plain VACUUM on large table to degrade performance by over 9 times? My database becomes unusable when VACUUM runs. From reading newsgroups, I thought VACUUM should only...
2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
2
by: David Garamond | last post by:
I was thinking on how one would design an optimal (performance-wise) database of large number of schedules with crontab-like semantic. There will potentially be hundreds of thousands or even...
3
by: Ulrich Wisser | last post by:
Hi, last night I tried to reindex my database with some really ugly results. I can no longer use the database. backend> REINDEX DATABASE "CLIX1" NOTICE: relation 16416 was reindexed NOTICE:...
3
by: josh.kuo | last post by:
Sorry about the subject, I can't think of a better one. I recently wrote some PHP classes that I think might be of interest to this group. Since I have been reaping the benefits of reading news...
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
10
by: shsandeep | last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development database while it took 2 hours to load in a UAT database. UAT db is partitioned. Dev db is not partitioned. the...
2
by: cday119 | last post by:
Can someone help me out with this one. I am trying to insert a row of data into an access database. The primary key is set to auto increment. It will work once but the next time you try an insert...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.