Solved

indexing database

Posted on 1998-07-26
3
140 Views
Last Modified: 2010-05-03
I am having difficulty appending records to the end of a database.  I understand how AddNew works but it sometimes puts records in between other records instead of at the index.  I even have a primary key that I created.  This primary key is of integer type and I increment it when I add a new record.  When it reaches 10, it appends that after index 1, not after index 9.  How do I overcome this?  I need to append each new record at the very end.
0
Comment
Question by:timpeters
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:percosolator
ID: 1466760
What are you using to view the data with?

Does it view like

1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9?

0
 
LVL 2

Expert Comment

by:percosolator
ID: 1466761
Also, what type of database are you accessing?
0
 
LVL 1

Accepted Solution

by:
web_crusher earned 50 total points
ID: 1466762
the database is fine - you just view it with the wrong viewer

the data1.recordser.movelast - always go to the last record
and put there ,after the addnew, your record
you view it with a bad viewer
and buy the way - a key that based on an interger is very limited - try the auto if u use that kind of db or just arrange a function that add some character to one of your fields - a one that will be original and dont have couple of those - cause then u wont have a key!!!

open a datagrid - u'll c it fine!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question