Validating number

NET webservice to validate South African Person ID numbers.It provides validation of a person ID by calculating the check-digit (digit-13), and extracts the date-of-birth, gender, citizenship, sequence and other information.I needed to convert to so here is my code if anybody needs a conversion in a hurry: Public Function parse Id No(By Val id No As String) As Boolean Try Dim a As Integer = 0 For i As Integer = 0 To 5 a = CInt(id No.Substring(i * 2, 1)) Next Dim b As Integer = 0 For i As Integer = 0 To 5 b = b * 10 CInt(id No.-- If the result is 2 digits, the last digit is used to compare against the last number in the ID Number.

For example, the last three digits in my driver's licence is 050 --- but in my ID it is 084This causes endless confusion. Id # to the picture and name of the person on it so I know if the person I am dealing with is legitimate or just using an valid ID # with his picture on it . I'm trying to convert Craig Peacocks SQL version to PL/SQL function and not getting anywhere. To avaoid this the following statement is required.

lv_C := lv_C lv_A; lv_D := 10 - (lv_C mod 10); IF (lv_D = 10) THEN lv_D := 0; END IF;-- compare value in lv_D with lv_last_number lv_last_number := CAST(SUBSTR(p_id_number, 13, 1) AS NUMBER); IF (lv_last_number = lv_D) THEN lv_is_valid := 1; lv_rply := TRUE; END IF; RETURN lv_rply; -- ************************************ -- ** Handle an unexpected exception ** -- ************************************ EXCEPTION WHEN lv_length_err THEN lv_rply := FALSE; return lv_rply; WHEN no_data_found THEN lv_rply := FALSE; return lv_rply; --custom exception (place your own methods here) --WHEN OTHERS THEN -- raise_exception(SQLCODE, SQLERRM, 'FN_VALID_SA_ID_NUMBER'); END; Hi there I am a technical consultant and would like to know what the SSS as well as the A (8 & 9 in the id) and the z stands for.

Please also confirm whether the the intelligence built in the South African Id number remains the same!!!!

I do not know what the 'A' digit represents - for the old blue book id numbers, this digit is often other values (specially '0').

For the new id's, this is almost always '8' or '9'.

Search for validating number:

validating number-47validating number-35validating number-17

would be interesting to see how they enforce that.... An old ex Zimbo friend of mine is a permanant resident but long time ago lost his ID book. NET post to cater for erroneous id No's like 0000000024588Its not very ellegant and wont get us into the next century, but then again neither will VB. Public Function parse Id No(By Val id No As String) As Boolean Try Dim a As Integer = 0 For i As Integer = 0 To 5 a = CInt(id No.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating number”