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

Updating normal and estimated values in recordset

1
Hello everyone,

I have some very difficult task to accomplish using ADODB, or DAO in visual basic 6 whichever. This is my masters project and I am stuck!! Say I have a recordset with 4 customers such as:

Expand|Select|Wrap|Line Numbers
  1. Field1        Field2        Field3        Field4        Field5        Field6        Field7
  2. E        N        E        E        N        E        N
  3. E        E        E        N        E        E        N
  4. E        N        E        E        E        N        N
  5. N        N        E        N        N        N        N
  6.  
Expand|Select|Wrap|Line Numbers
  1. E=estimated value
  2. N=normal value
  3.  
The number of records are 180,000k (rows), so this cannot be done manually. Basically for rows I wish to convert estimated values into normal values. So row1 is:

Expand|Select|Wrap|Line Numbers
  1. Field1        Field2        Field3        Field4        Field5        Field6        Field7
  2. E1        N2        E3        E4        N5        E6        N7
  3.  
CONVERSION
Field 1: Converting field1 to normal value, we have to see the number of estimates before field2, since there is only one, so I need to update in such a way:

Expand|Select|Wrap|Line Numbers
  1. Field1        Field2        Field3        Field4        Field5        Field6        Field7
  2. N2/2        N2/2        E        E        N        E        N
  3.  
Then continue to the next estimated element if there is any in that row.
Field 5: Converting field3, field4 to normal value, we have to see the number of estimates after the last normal value I.e. field2 until field 5, since there are 3, so I need to update in such a way:

Expand|Select|Wrap|Line Numbers
  1. Field1        Field2        Field3        Field4        Field5        Field6        Field7
  2. N2/2        N2/2        N5/3        N5/3        N5/3        E        N
  3.  
Then continue to the next estimated element if there is any in that row.
Field 7: Converting field6 to normal value, we have to see the number of estimates after the last normal value I.e. field5 until field 7, since there is only 1, so I need to update in such a way:

Expand|Select|Wrap|Line Numbers
  1. Field1        Field2        Field3        Field4        Field5        Field6        Field7
  2. N2/2        N2/2        N5/3        N5/3        N5/3        N7/2        N7/2
  3.  
And then continue to the next row, since there is no "E" element and/or the last field of the row was achieved. Then repeat this for all the rows in the recordset.
Provided there is one constraint, if the last value i.e. Field7 is “E” then obviously we cannot normalize the value and update, since there is no “N” value next, so I can use sql to filter those records in that case (which is very frequent).

Basically, my values for E and N in the recodset are such that, I make it a bit easy:

Expand|Select|Wrap|Line Numbers
  1. E= “E:<value here>”
  2. N= “N:<value here>”
  3.  
So after I check whether it is “N” or “E” I can split the string with respect to “:” and using the first index, i.e. index=1 to retrieve the value from the string, and can then update it to which ever format I like.

Note the problem is the gaps between "N" and "E" are never fixed always changing, this is causing the main problem. Anyway to tackle this?? Any psuedocode or logic??

Any help regarding this type of problem. I know this is difficult. All help is appreciated.
Jul 2 '08 #1
0 952

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will...
2
by: Alexey.Murin | last post by:
The application we are developing uses MS Access 2003 database (with help of ADO). We have noticed that during massive records updating the size of the mdb file increases dramatically (from 3-4 to...
8
by: Chris A via AccessMonster.com | last post by:
I have an interesting problem that I have yet to come accross that I can't change data structure on because it is an export from filemaker I am reformatting for another dept. anyway. I have a table...
5
by: zMisc | last post by:
Are there any tricks in updaitng a JOINed recordset? I joned to tables and when I try to change a field on the recordset and update it, I get this error: "Unknown column 'CCDE' in 'where...
4
by: cbrichards via SQLMonster.com | last post by:
I have a stored procedure that will execute with less than 1,000 reads one time (with a specified set of parameters), then with a different set of parameters the procedure executes with close to...
3
by: jason.teen | last post by:
Hi, I'm trying to update a recordset (change field values, delete records) but I have found that it actaully is changing the original tables. When when I was hoping for was actaully that the...
11
by: bbasberg | last post by:
Hello, I have been struggling with this problem for DAYS and have googled my heart out as well as reading any books I could get my hands on but I cannot find any specific references to my problem....
12
lotus18
by: lotus18 | last post by:
Hi everyone I have a little problem in updating a record. I know how add a new record and check if the inputted new data is existing or not as what they have discussed in...
4
by: AlexNunley | last post by:
I've adopted a moderately sized (65k records) active use database (Access 2000, Windows XP). One of the most commonly used forms is whats called the RMA generation field, used to add claim...
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
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
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
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...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.