[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Validation in a data entry form

Posted on 2000-05-01
17
Medium Priority
?
295 Views
Last Modified: 2010-04-04
I want to know what is a typical code of validation for a data entry form and in which event I must attach it.
For example I have my form has fields
numeric-integer,real numbers,alphanumeric-string 20 and some of them I want to be required.
Usually I use a DBgrid component for data entry is this right? if not what is better way and which code is necessary.
If is possible to have an example.
0
Comment
Question by:vage78
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 2
  • +2
17 Comments
 
LVL 7

Expert Comment

by:Motaz
ID: 2768229
You can put validation in the Paradox table, for example maximum value, minimum, and default values
0
 
LVL 3

Expert Comment

by:Stefaan
ID: 2768531
Hi,

Just a little note here.  From my point of view, I wouldn't recommend to use a DBGrid for entering record information.

Personally I have creaded a template DB Form (from which all my DBForms inherit) with a PageControl which has at least 2 TabSheets.  The first TabSheet (which is the RecordView) has a DBGrid which is Read Only.  From this view the user can see all the records or he can filter the results.  When double clicking on a record in the grid, the user gets the List View tabsheet on which he can edit the record using DataAware controls.  Also when the user clicks on the Insert or Edit button of the TDBNavigater the ListView tabsheet is shown to the user.

Well, this is only my personal input on this matter, but IMHO (and I think some other experts will agree with me) you shouldn't use a DBGrid for editing or entering data.

Best regards,


Stefaan
0
 

Author Comment

by:vage78
ID: 2768631
Edited text of question.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:vage78
ID: 2768634
Is it possible to have an example, Stefaan?
0
 
LVL 3

Expert Comment

by:Stefaan
ID: 2768658
Hi,

Well, if you can supply me with an e-Mail adress, I could set up a little sample for you.
0
 

Author Comment

by:vage78
ID: 2768691
OK, Stefaan
my e-mail adress is billi200@hotmail.com
Thank you very much
0
 
LVL 3

Expert Comment

by:Stefaan
ID: 2768717
Hi,

One more question, do you have the RxLib components ? My sample uses the grid from that library, but if you don't have the library, I'll use the default delphi DBGrid.
0
 
LVL 2

Expert Comment

by:mullet_attack
ID: 2768738
Just an opinion...

I mostly use grids for user input, especially Infopower grid with combo's etc embedded. For me, this gives the best use of screen 'real estate', and previous records shown in the grid prompt novice users as to what sort of data the grid is expecting (for new records.)

There, I've had my two cents worth... :-)
0
 

Author Comment

by:vage78
ID: 2768765
Stefaan, I use the default DBGrid componenet.
Thanks
0
 

Author Comment

by:vage78
ID: 2768773
Stefaan, I use the default DBGrid componenet.
Thanks
0
 
LVL 3

Expert Comment

by:Stefaan
ID: 2768809
Hi,

Well I have sent a saple to your e-mail adress.  It only contains the source code and is only 45 Kb.

If you have any questions, feel free to ask them.

Best regards,


Stefaan.


(Only use the second zip file, in the first I forgot to put the grid in ReadOnly)
0
 

Expert Comment

by:mrissmann
ID: 2772150
We do not use grids for data entry.  We use components such as TDBEdit and such.  We actually derived from these and added an inputrequired published field (or you can use different tag values).  On the before post you can cycle through the controls for that datasource and do your validation like required fields, validate the data...

Mark
0
 

Author Comment

by:vage78
ID: 2772163
May I have a simple example, Mark.
Thank you
0
 
LVL 3

Accepted Solution

by:
Stefaan earned 30 total points
ID: 2772172
Hi,

I have sent you a new version of the DBSample project I created for you.  This time I hope there arn't anymore Delphi 5 components in it.

I have also included the Executable in the ZipFile.

Best regards,


Stefaan
0
 

Author Comment

by:vage78
ID: 2772684
Thank you Stefaan
0
 

Expert Comment

by:mrissmann
ID: 2774193
Do you still want an example?

Mark
0
 

Author Comment

by:vage78
ID: 2776136
Yes, Mark
But if you can it must be simple with input validation
bye
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

649 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