Solved

Validation in a data entry form

Posted on 2000-05-01
17
290 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
  • 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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 10 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 129
Intraweb download file link ? 1 132
FMX and jaudiotracker playing memory stream 29 78
MS Access from Delphi 31 28
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…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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