dBASE Programming - Re: VIN check digit

This is Interesting: Free IT Magazines  
Home > Archive > dBASE Programming > May 2005 > Re: VIN check digit





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: VIN check digit
Glenn

2005-05-17, 8:47 pm

news.alldbase.com wrote:
> I'm trying to take a vechicle ID number and calculate the check digit to
> make sure it is a real VIN. But my results never seem to match the check
> digits. This isn't rocket science and should be easy. I just can't get it
> right. Here are a couple of references, although the web is full of them.
> http://www.angelfire.com/ca/TORONTO/VIN/checkdigit.html
> http://www.dmcnews.com/Techsection/vindecoder.html
> http://www.vehicleidentificationnum...
ent.html

> There is even a php version here
> http://www.phpbuilder.com/snippet/d...=snippet&id=892
> And still I can't get anything to work.
> One example of my code is below. I know I must be doing something stupid...


You were checking the wrong value. below is copied from the website.
Below that is my correction.

Glenn Fausel


# The resulting products are summed.
# The total is divided by 11.
# The check digit is the remainder. If the remainder is 10 then the
check digit is X (Roman numeral 10).

cd = mod(nCheck,11)
? val(cCheckDigit) == iif(cd< 10,cd,"X")

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com