473,789 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2307

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.co m 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.co m 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.goog legroups.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
2413
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. http://www.aspfaq.com/show.asp?id=2023 Now I am facing another problem. I have to get data between two dates. That dates user has to provide and in
4
4168
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 both tables but i need to check that this is so. (Maybe a user deleted a row in one table only or changed a value in a field!). The tables have no unique index.
1
3462
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 automatic. I am having trouble with the comparing the old month stored as two digit number as text with the new two digit month found using format(date(),"mm")
19
2658
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 = Color.Empty then..... or if mycolor is Color.Empty then .......
0
2394
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 D 'Delete
6
1901
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 withing my recordset (so I know the statement works) but it will not work for the field I want to compare. The only difference with this field is that it has null values. Could this be the problem? if so, how do I deal with nulls?
2
1840
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 suggestions would be appreciated.
21
2341
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 process faster and if it is possible in VB. The idea is to compare two tables and if there is some distinction, then is written in third table. Some tables contains more than 200 000 rows and each row contain approximatelly 30 parameeters (columns)....
3
2044
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 different on comparing. Regards Hasnain
4
6408
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 quite new to trying to mess around with VB and ADO within MS Access and have realised the steep learning curve I have, but, I want to try and solve this problem quickly and was wondering if anyone would help me out?? I want to be able to...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3700
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.