If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Minimum Number Of Characters

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-04, 13:51
jwman jwman is offline
Registered User
 
Join Date: Aug 2004
Posts: 82
Exclamation Minimum Number Of Characters

Ok once again the problem is:

I have a setup database with keeps a log of all credit Card numbers and I want it to have a minimum amount of characters so if someone types in a number less than 16 numbers:



msgbox "Sorry but the number you have entered insn't valid!,vbcritical, "Error"

Thanx in advance
Hope you can help??
Reply With Quote
  #2 (permalink)  
Old 09-05-04, 16:09
sundialsvcs sundialsvcs is offline
Registered User
 
Join Date: Oct 2003
Posts: 706
Usually you do a lot more than just counting digits. Credit card numbers have various mathematical properties that can be used to detect 'tpyos.'

I usually program all such record-validation tests in a method that will fire just before the record posts. I usually do not trigger them on-exit from the field. It is nice when the routine checks all of the fields at once for errors, and lists all of the error-messages found.

Virtually any book covers record validation as one of its main topics.
__________________
ChimneySweep(R): fast, automatic
table repair at a click of the
mouse! http://www.sundialservices.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On