Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


need a trigger to prevent invalid dates

need a trigger to prevent invalid dates

Hi experts,

An application my new company uses allows invalid dates to be stored (2/29, 4/31, 6/31, 9/31, 11/31). Pervasive is not anyone's speciality and the application vendor takes too long to get things done (especially since it doesn't hurt their application) so I would like to ask if anyone already has a trigger that can check for bad dates. We know which tables and columns to target and a trigger seems like the right way to go - get the data fixed before it goes in.

Thank you, I hope I'm not asking for too much.

Warm regards,

RE: need a trigger to prevent invalid dates

First of all, Triggers may not work for you.  If the application uses the Btrieve interface, adding a trigger will disable Btrieve access to that file.  For example, if you add an Insert trigger to a table, Btrieve will not be able to insert a record.  Btrieve will return a status 149.
Second, I don't believe the PSQL trigger syntax would allow you to do what you are looking for.

Certified Pervasive Developer
Certified Pervasive Technician

RE: need a trigger to prevent invalid dates

Thank you mirtheil for replying.

I found my way a bit around the tek-tips web site and did a search. Someone had posted a link to a Pervasive web site (www.pervasive/componentzone/..) and there was a DateFixer utility. I have not tried it yet (scared to, it's quite a few years old).

Warm regards,

RE: need a trigger to prevent invalid dates

I've seen that tool.  I can't say I've used it but I believe it works.  THat being said, all it does is fix existing dates in a table.  It will not prevent them from being added in the first place.

Certified Pervasive Developer
Certified Pervasive Technician

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close