Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataExpress: Where Do I Put Validation Code?

Status
Not open for further replies.

davewelsh

Programmer
Jun 26, 2001
71
CA
I have a QueryDataset that needs to be validated before it's committed to the database. The province field must match up with the country field.

I started using a QueryResolver and it worked great. I could call resolverResponse.skip() to cancel the commit and prompt the user for changes.

But now I want to do the same thing at the post stage instead of the database-saving stage. Does anyone know where I could put my validation code?
 
The best I could do so far was to handle the updating event of my QueryDataset and throw an exception if I didn't want the post to go through. I'm not sure if there is a better way to do it though.

The reason I want to do this is because of the way I handle the navigation with the jdbNavToolBar. Once the dataset has changed (modifying event) I disable the forward, back, insert, delete, first, and last buttons on the navigation bar. Then once the record has been posted/cancelled, I re-enable navigation. I want the error checking done before the user moves on to the next record.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top