Valdity check at rutime

Posted on 2000-03-11
Last Modified: 2010-04-04
i ask about set all value of valdity check of field at rutime such as min ,max and defualt value of field all field i mean createtion at rutime ...

Question by:Azzoz
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
LVL 15

Accepted Solution

simonet earned 50 total points
ID: 2608020
There are 2 ways to do this:

1) Do it on the database server: you can set the constraints in the database-level, which is the most adequate approach if you are creating a client/server application. In order to do this, you can execute an SQL statement that will create the constraint:


ALTER TABLE accounts

(actual syntax depends on the DMBS you're using)

2) You can do it using the fields inspector for the TQuery/TTable you are using:

- Double click the TTable/TQuery component;
- Right-click the the Fields window and select "Add all fields"

Ok, this preparation is necessary in Design-time so you can do all the rest in runtime:

Table1.FieldByName('Balance').DefaultExpression := 0;

Table2.FieldByName('Salary').MinValue := 7000;


LVL 27

Expert Comment

ID: 2608068
just complete ;-)

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor ( Top Charts is a view in which you can set seve…
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
Course of the Month8 days, 15 hours left to enroll

615 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