Solved

Checking a Belgian Bank account number

Posted on 2004-04-30
4
381 Views
Last Modified: 2011-04-14
Hi, I hope someone can give me a function to check wether a Belgian bank account number is right or not. I'm living in Belgium. An account number is like this: 111-1111111-11

I hope to get an answer very soon.

Thanks a lot
Marioway
0
Comment
Question by:marioway
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:sftweng
ID: 10964256
What do you want to confirm, that it is syntactically corect, that it actually exists as confirmed by the bank or that a particular transaction will succeed?

We need more information.
0
 

Author Comment

by:marioway
ID: 10964899
I was not clearly enough. Sorry for that. I'm looking for a function that confirms the number actually exists. I found one in VB
but I don't know how to convert it into Delphi syntax.

Private Function ControleBankNummer(BankNummer As String) As Boolean

Dim Nummer As Double
Dim Rest As Integer
Nummer = Val(Left(BankNummer, 10))
Rest = CInt(Nummer - (97 * Fix(Nummer / 97)))
ControleBankNummer = IIf(Rest = Val(Right(BankNummer, 2)), True, False)

End Function

Thanks
marioway
0
 

Author Comment

by:marioway
ID: 10964977
It is 02.00 AM and Eureka, I found it . I was using Longint instead of Int64. My code now looks like this and it works:

procedure TAdministratie.MaskEdit2Exit(Sender: TObject);
var Nummer: Int64;
    Rest: Int64;
begin
 Nummer:= StrToInt64(Leftstr(MaskEdit2.Text, 10));
 Rest:= (Nummer)MOD 97;
 if Rest = StrToInt64(RightStr(MaskEdit2.Text, 2)) then
  begin
  end
 else
  ShowMessage('Verkeerd rekeningnummer. Corrigeer.');
end;

Thanks
marioway
0
 
LVL 7

Accepted Solution

by:
sftweng earned 500 total points
ID: 10965012
Good. Sometimes all that is needed is to talk with someone about it. ;-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month11 days, 18 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question