473,320 Members | 2,003 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,320 software developers and data experts.

Comparing fields

Greetings,
I have a simple html/asp form that submits data to an access DB. The
idea is
when calling a record back from the db, the page will have an option to

change certain fields (drop down) then a new submit option.
My question at this point would be what logic or commands would I use
to compare the original data in the fields to what's being submitted. I

ultimately want to preserve the original records and somehow append
data that changes only. I'll need to eventually call a record and see
all the changes/updates made.
Someone mentioned I would prob need a couple of tables with a link
(relationship) but is it possible to dynamically create fields as
changes are made?

Thanks in advance,

Oct 24 '06 #1
3 2288

Hi,

Just wanna make sure i got the question before i write you the code.
Do you want to compare the old record with the new one by each letter
or character in the field
for example:
Field1(OLD): Hello
Text to add to Field1: Heeey

the result: last three characters are diffrent

is this what you are looking for??
Best Regards
Firas S Assaad
On Oct 24, 7:47 am, b...@hotmail.com wrote:
Greetings,
I have a simple html/asp form that submits data to an access DB. The
idea is
when calling a record back from the db, the page will have an option to

change certain fields (drop down) then a new submit option.
My question at this point would be what logic or commands would I use
to compare the original data in the fields to what's being submitted. I

ultimately want to preserve the original records and somehow append
data that changes only. I'll need to eventually call a record and see
all the changes/updates made.
Someone mentioned I would prob need a couple of tables with a link
(relationship) but is it possible to dynamically create fields as
changes are made?

Thanks in advance,
Oct 24 '06 #2
Hi,
It would search the current field and check for an exact match (letter
by letter with no case sensative). If it finds a match then it won't
write anything to the DB otherwise it will write the new information in
the DB.

Thanks,

Firas S Assaad wrote:
Hi,

Just wanna make sure i got the question before i write you the code.
Do you want to compare the old record with the new one by each letter
or character in the field
for example:
Field1(OLD): Hello
Text to add to Field1: Heeey

the result: last three characters are diffrent

is this what you are looking for??
Best Regards
Firas S Assaad
On Oct 24, 7:47 am, b...@hotmail.com wrote:
Greetings,
I have a simple html/asp form that submits data to an access DB. The
idea is
when calling a record back from the db, the page will have an option to

change certain fields (drop down) then a new submit option.
My question at this point would be what logic or commands would I use
to compare the original data in the fields to what's being submitted. I

ultimately want to preserve the original records and somehow append
data that changes only. I'll need to eventually call a record and see
all the changes/updates made.
Someone mentioned I would prob need a couple of tables with a link
(relationship) but is it possible to dynamically create fields as
changes are made?

Thanks in advance,
Oct 25 '06 #3

<bv***@hotmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Greetings,
I have a simple html/asp form that submits data to an access DB. The
idea is
when calling a record back from the db, the page will have an option to

change certain fields (drop down) then a new submit option.
My question at this point would be what logic or commands would I use
to compare the original data in the fields to what's being submitted. I

ultimately want to preserve the original records and somehow append
data that changes only. I'll need to eventually call a record and see
all the changes/updates made.
Someone mentioned I would prob need a couple of tables with a link
(relationship) but is it possible to dynamically create fields as
changes are made?
No. How many fields would be changing in a single post?

Here are two choices:-

1).

Have a second table which is identical to the first except it has version
number field added to the primary key include a version number on the
original table but do not add it to the primary key. After an update
happens on the table (the version number is incremented as part of the
update) make an insert to second table verbatim from the row that was just
updated. It's simple and effective but can make the DB large due to some
duplication of field values that have not changed, which in Access may be a
concern.

2).

Another choice is to have second table which includes the same fields that
make up the PK of the original table and adds a version number to them which
is also included in the original table. This table has a FieldName column
to contain the name of a field that is changing. It also has a value column
which contains a string that represents the value of the field for the
version.

When an update occurs allocate the next version number for the record to be
updates. Then compare the string version value of the each field being
updated with the incoming changes, if different insert a new record to the
second table with the PK of the record being updated, the new version
number, the field name and the new string value. After all the changes have
been logged make the update itself.

This approach suffers from complexity and results in values being stored as
strings rather than their native types. Also the more fields that change
per update the more duplication of PK and version number there will be.
That combined with using a string to represent data which is often smaller
in it's native type may mean this approach will also bloat your DB.
If you do use any of these approaches use a transaction to make the updates
atomic.
I prefer (and have used albeit in SQL Server) approach 1.

Thanks in advance,

Oct 26 '06 #4

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

Similar topics

4
by: F | last post by:
Hi I have posted the question few days back about problem in inserting the dates in SQL server and thankful to them who replied. That was solved and this is a nice solution....
4
by: osmethod | last post by:
Hello, I have read many articles about comparing tables, like - loops, delete queries, appending to temp table with index etc Problem: 2 tables T1 & T2. Data is suppposed to be the same in...
1
by: DaveA | last post by:
Our incident numbering system is based on the following YEAR 05 MONTH 06 NMBR 1234 looks like 05-06-1234 the counter number is manually reset each month and I would like to make it...
19
by: Dennis | last post by:
I have a public variable in a class of type color declared as follows: public mycolor as color = color.Empty I want to check to see if the user has specified a color like; if mycolor =...
0
by: richardkreidl | last post by:
I have the following hash script that I use to compare two text files. 'Class Public Class FileComparison Public Class FileComparisonException Public Enum ExceptionType U 'Unknown A 'Add...
6
by: abbylee26 | last post by:
Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData This will work when comparing other fields...
2
by: The guy upstairs | last post by:
Am looking for suggestions on comparing two email fields. Have looked in the usual cut and past sites, but none seem to fit. the name of the two fields are email and confirmEmail. Any...
21
by: Kristaps | last post by:
Hi everyone! I have some questions, maybe someone can help me... I write script for table comparing, but it works wery slovly. There is the script, can anyone give some tip how can I make this...
3
by: hasnain | last post by:
Dear All, I want to compare two tables. Both of the tables have same fields but their location in terms of columns can be different. My target is to get those fields only whose values are found...
4
by: gillianbrooks91 | last post by:
Forgive me for asking this question, I've trawled through nearly every available post on this subject that I can find for a few weeks now but nothing quite points me in the right direction. I'm...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.