Please Help Urgent help needed!!!!

Please Help Urgent help needed!!!!

Post by Manoj Jaco » Fri, 02 Nov 2001 19:41:01



Hi guys

I have been creating this application using VB and Access 2000
now after some time and when i thought the application is coming to its end
i find a BIG problem....

i have been adding records to a table and when i do it, i usually calculate
the values of this  new record using the previous records...so i use
Moveprevious and such things to calculate the new values....

But now i think my whole application is going to crash....because from last
tzo days the program has been inserting the new records just anywhere in the
middle instead of in the end of the table....Is there a specific thing i
have to do to make the new added recorded always be added in the end of the
table or as the last record....

Please guys help and looking for some positive reply at the earliest

Cheers
manoj

 
 
 

Please Help Urgent help needed!!!!

Post by John Crumle » Sat, 03 Nov 2001 03:37:54


Manoj,

My first reaction is that the order in which the data is viewed/returned to
your recordset will be determined by the indexes/sorting/keys which are
setup in the tables or which are set up in the statements to retreive the
data.

My expectation would be that the record is added at the end and then the
next time you look at a table it may be in the middle because, for example,
your primary key is last name and set to be sorted in ascending order.

As one solution which (I think) is independant of the reason why this is
happening, use a piece of data to determine which records are "earlier" than
the one being added, set a filter on the recordset to restrict the data to
that, iterate over the filtered data to do your calculations, then remove
the filter.  There are several other ways to do the calculations, the key is
using a piece of data to determine "previous" records.

If no such logical piece of data exists, add a "record creation date/time"
field.  You could also use an autonumber field but this could be dangerous
depending on the specifics of your application (replication, number of
records, etc...)

John

Quote:> Hi guys

> I have been creating this application using VB and Access 2000
> now after some time and when i thought the application is coming to its
end
> i find a BIG problem....

> i have been adding records to a table and when i do it, i usually
calculate
> the values of this  new record using the previous records...so i use
> Moveprevious and such things to calculate the new values....

> But now i think my whole application is going to crash....because from
last
> tzo days the program has been inserting the new records just anywhere in
the
> middle instead of in the end of the table....Is there a specific thing i
> have to do to make the new added recorded always be added in the end of
the
> table or as the last record....

> Please guys help and looking for some positive reply at the earliest

> Cheers
> manoj


 
 
 

Please Help Urgent help needed!!!!

Post by Steve Lupto » Fri, 09 Nov 2001 10:09:44


Records in Access tables have no inherent order; that is, there is no record
number or physical order to records at all.  New records may, in fact, be
added anywhere in the access mdb.  You set the order of your recordset by
the "ORDER BY" clause of your SQL statement.


Quote:> Hi guys

> I have been creating this application using VB and Access 2000
> now after some time and when i thought the application is coming to its
end
> i find a BIG problem....

> i have been adding records to a table and when i do it, i usually
calculate
> the values of this  new record using the previous records...so i use
> Moveprevious and such things to calculate the new values....

> But now i think my whole application is going to crash....because from
last
> tzo days the program has been inserting the new records just anywhere in
the
> middle instead of in the end of the table....Is there a specific thing i
> have to do to make the new added recorded always be added in the end of
the
> table or as the last record....

> Please guys help and looking for some positive reply at the earliest

> Cheers
> manoj

 
 
 

Please Help Urgent help needed!!!!

Post by Hug » Sat, 10 Nov 2001 00:10:25


Quote:

> i have been adding records to a table and when i do it, i usually calculate
> the values of this  new record using the previous records...so i use
> Moveprevious and such things to calculate the new values....

I think the quickest solution is to add an autonumber field and then
before inserting the data, find the biggest value. U can also create
this "autonumbering" by code yourself, but it's a bit tricky (I've
never done it, but I've seen it in a book). Another way it to create a
separate table in which u write the values manually. So when u want to
use them, then just look for the value in the table.

HTH
Hugo

 
 
 

1. HELP PLEASE: URGENT: Need help forming a multi table query

Hello,

I'm using SQL SERVER 7.0. I'm very new to Multi-Table querying, and
can't seem to figure this one out. Any help would be appreciated.

I have 2 tables. one is called RATES and one is called BILLING

In the BILLING table, there are 2 columns, one is COUNTRY and
the other is ACTUAL.  In the RATES table, there are two columns
COUNTRY (which you would use to match the rate to) and RATE.

This is for an ASP page. It has to go row by row of the BILLING
table and calculate the total of a phone call, by multiplying the
ACTUAL of BILLING column with the RATE for that COUNTRY.
It sounds simple, but I get strange (wrong) results everytime.

Any help would be appreciated.  Thanks in advance.

Ayaz Asif

2. retrive DB in applet...difficult ?

3. Urgent help needed please help

4. Searching for quote character?

5. Newbies need help.........Urgent please help.....!!

6. VB, C++ Programmer Wanted

7. Newbies need help......Urgent please help!!

8. Losing SQL Server connection

9. COMBO BOX, PLEASE HELP, PLEASE HELP, PLEASE HELP!

10. Please Please help !!! Crystal Report Help Needed

11. I need help in designing a school database Please Please help

12. URGENT - need help quick please!

13. Urgent help needed by novice, please!