Solved

Comparing 2 tables in Delphi 1.0 or Reportsmith(sql)

Posted on 1997-10-17
2
154 Views
Last Modified: 2010-04-04
hi....

I need to comapre 2 tables of same format(one old, one updated) the field values being yes/no. I need to produce a discepency report where only the unmatched fields are displayed.

I have an idea :
Take field values from both tables and place them in variables in Delphi then comparing them and outputting the unmatched variables to a new tempororay table that is eliminated after this report is generated.

How would you suggest that I solve this problem. Should I use Delphi 1.0 or should I use Reportsmith for processing.

Yours Sincerely
sprawler
0
Comment
Question by:sprawler
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1347822
I have another idea,
Define in one of the tables an calculated field. Then in OnCalcFields Event. Check the two fields and place the result in the calculated field.

procedure TForm1.OnCalcFields..........;
begin
Table2.FieldByName([NoMatch]).AsBoolean :=
(Table1.FieldByName([Value]).AsString <> Table2.FieldByName([Value]).AsString)
end;

After this filter this table on all the values with nomatch = true;

Look out! Two tables have to be in sync.

For making report, it depends. If you want to make a very beautifull layout, you should use reportsmith or Quickreport. But if you use reportsmith you have to deploy that program as wel with your own program. If you just want to have a print-out, I advise to use Delphi. With Delphi you can also make beautiful reports but that takes a little more time and isn't so easy.
Wich program to process? Depends on which you take to make your report.
But if yuo plan to use the results also for other processing, use D1. I don't know if you know it but you can also use sql in D1, not only in reportsmith.

Have fun,
c.u. ZifNab;
0
 

Author Comment

by:sprawler
ID: 1347823
Hi ...

 That is a good idea ....

I do now about the SQL capabilities of Delphi but I am not fully clued up on SQL code. If possible, would you pleez suggest how
I shoul make use of the SQL. An example will help tremendously.

Tanx
sprawler


0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now