Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

SA Bank Account Number Validation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SA Bank Account Number Validation

    Hi,

    I am currently working on South African Bank account number validation routines. Unfortunately do I only have access to limited validation rules set out by the banks.

    Are there any developers who have created such a routine,
    or where I can get additional information regarding the different rules per bank?


    Any help will be appreciated.
    Regards
    Walter

    #2
    Re: SA Bank Account Number Validation

    I have found a company that will sell a DLL file to incorporate into "ANY" software system to do the account number checking.

    Is it possible to incorporate any DLL file to work with ALpha ??

    Regards
    Walter

    Comment


      #3
      Re: SA Bank Account Number Validation

      http://support.alphasoftware.com/alp...ge/declare.htm

      This is code to declare functions in dlls so you can access them

      Comment


        #4
        Re: SA Bank Account Number Validation

        Hi,

        I have been trying to call the dll, but no luck:

        The dll to use is called: cdvdll.dll

        The following is one of the dll functions I may use:

        Code:
        (**************** CDV2 ******************
        RETURNS:
         CDV_OK                 = 0;
         CDV_INVALIDBRANCHCODE  = 1;
         CDV_FAIL               = 2;
         CDV_INVALIDACCOUNTTYPE = 3;
        *)
        function CDV2( TSMFilename : pchar;           // SORTED TSM900 data file (MUST BE SORTED!!!)
                       BranchCode  : pchar;           // 6 digit branch code to validate
                       AccountNo   : pchar;           // Account number to validate
                       AccountType : integer          // Account Type to validate (1=current,2=savings,3=transmission,4=bond,6=subscription share)
                     ): integer; export; stdcall;
        The VB Demo script is as follows:
        Code:
        VERSION 5.00
        Begin VB.Form Form1 
           BorderStyle     =   1  'Fixed Single
           Caption         =   "Test CDV dll"
           ClientHeight    =   3615
           ClientLeft      =   45
           ClientTop       =   330
           ClientWidth     =   4380
           Icon            =   "Form1.frx":0000
           LinkTopic       =   "Form1"
           MaxButton       =   0   'False
           MinButton       =   0   'False
           ScaleHeight     =   3615
           ScaleWidth      =   4380
           StartUpPosition =   1  'CenterOwner
           Begin VB.CommandButton Command2 
              Cancel          =   -1  'True
              Caption         =   "Cancel"
              Height          =   495
              Left            =   2340
              TabIndex        =   5
              Top             =   2940
              Width           =   1575
           End
           Begin VB.CommandButton Command1 
              Caption         =   "Test"
              Height          =   495
              Left            =   420
              TabIndex        =   4
              Top             =   2940
              Width           =   1575
           End
           Begin VB.TextBox Text2 
              Height          =   375
              Left            =   1620
              TabIndex        =   3
              Text            =   "Text2"
              Top             =   720
              Width           =   2475
           End
           Begin VB.TextBox Text1 
              Height          =   375
              Left            =   1620
              MaxLength       =   6
              TabIndex        =   2
              Text            =   "Text1"
              Top             =   240
              Width           =   2475
           End
           Begin VB.Label Label4 
              Caption         =   "Branch Name"
              Height          =   435
              Left            =   120
              TabIndex        =   9
              Top             =   1860
              Width           =   1215
           End
           Begin VB.Label Label3 
              Caption         =   "Result"
              Height          =   375
              Left            =   120
              TabIndex        =   8
              Top             =   1260
              Width           =   1395
           End
           Begin VB.Label lblReturnStructure 
              Height          =   675
              Left            =   1620
              TabIndex        =   7
              Top             =   1860
              Width           =   2535
              WordWrap        =   -1  'True
           End
           Begin VB.Label lblReturnInfo 
              Height          =   495
              Left            =   1620
              TabIndex        =   6
              Top             =   1260
              Width           =   2535
              WordWrap        =   -1  'True
           End
           Begin VB.Label Label2 
              Caption         =   "Account Number"
              Height          =   315
              Left            =   120
              TabIndex        =   1
              Top             =   840
              Width           =   1395
           End
           Begin VB.Label Label1 
              Caption         =   "Branch Code"
              Height          =   255
              Left            =   120
              TabIndex        =   0
              Top             =   300
              Width           =   1275
           End
        End
        Attribute VB_Name = "Form1"
        Attribute VB_GlobalNameSpace = False
        Attribute VB_Creatable = False
        Attribute VB_PredeclaredId = True
        Attribute VB_Exposed = False
        Option Explicit
        
        Private Type TTSMAccountInfo
            AccountType As String * 1
            Modulus As String * 2
            FudgeFactor As String * 2
            CDVWeightings(0 To 10) As String * 2
            ExceptionCode As String * 1
            AccountIndicator As String * 1
        End Type
          
        Private Type TTSM900
            RecordId As String * 2
            BranchCode As String * 6
            SSVAllowed As String * 1
            TwoDayAllowed As String * 1
            FiveDayAllowed As String * 1
            StreamCode As String * 2
            OutputCentre As String * 1
            ExceptionStreamCode As String * 2
            ExceptionAccountType As String * 1
            ExceptionOutputCentre As String * 1
            Filler1 As String * 1
            BranchName As String * 30
            StreetAddress1 As String * 48
            StreetAddress2 As String * 48
            POBoxNumber As String * 8
            POBoxPostOffice As String * 20
            PostalCode As String * 6
            AccountInfo(0 To 8) As TTSMAccountInfo
            TelephoneNo As String * 14
            DialingCode  As String * 20
            Telex1 As String * 20
            Telex2 As String * 20
            DeletionDate As String * 2
            OneDayAllowed As String * 1
            Filler2 As String * 83
            CRLF As String * 2
          End Type
          
        Private Declare Function GetBranchInfo Lib "cdvdll.dll" (ByVal TSMFilename As String, ByVal BranchCode As String, udtBranchInfo As TTSM900) As Byte
        Private Declare Function CDV Lib "cdvdll.dll" (ByVal TSMFilename As String, ByVal BranchCode As String, ByVal AccountNo As String, ByVal BranchType As Integer, udtBranchInfo As TTSM900) As Integer
                                                           
        Private Sub Command1_Click()
        
        Dim iReturn As Integer
        Dim udtBranchInfo As TTSM900
        Dim sBranchCode As String
        Dim sAccountNo As String
        Dim sFileName As String
        Dim iAccountType As Long
        
        sBranchCode = CStr(Text1.Text)
        sAccountNo = CStr(Text2.Text)
        sFileName = App.Path & "\tsm900.srt"
        iAccountType = 1
        
        'iReturn = GetBranchInfo(sFileName, sBranchCode, udtBranchInfo)
        
        iReturn = CDV(sFileName, sBranchCode, sAccountNo, iAccountType, udtBranchInfo)
        
        Select Case iReturn
            Case 0
                lblReturnInfo.Caption = "OK"
            Case 1
                lblReturnInfo.Caption = "INVALID BRANCH CODE'"
            Case 2
                lblReturnInfo.Caption = "INVALID ACCOUNT NO"
            Case 3
                lblReturnInfo.Caption = "INVALID ACCOUNT TYPE"
        End Select
          
        lblReturnStructure.Caption = udtBranchInfo.BranchName
        
        End Sub
        
        Private Sub Command2_Click()
            End
        End Sub
        
        Private Sub Form_Load()
        
        Text1.Text = "201709"
        Text2.Text = "50060058755"
        
        End Sub
        I have tried to declare this dll, but am getting an error:
        Cannot load / find external library.

        I used this statement to declare:
        Declare CDV2 cdvdll LLLII

        In which folder should the dll file be located?
        I have tried a5v9 and my app_path

        Please assist, as I have no idea on how to get this one going...

        Regards
        Walter

        Comment


          #5
          Re: SA Bank Account Number Validation

          You may have better luck working with a HTTP_FETCH() command and using one of the services found here: http://www.quentinsagerconsulting.com/webservices.htm.

          See International Bank Accnt Val about half way down. I have not done this from a desktop application, but it works from the web (generally I mean, I have not used this particular services).
          Steve Wood
          See my profile on IADN

          Comment


            #6
            Re: SA Bank Account Number Validation

            Hello Steve,

            Thanks for the reply.

            The client needs to process hundreds of bank accounts every day and the users do not always have internet access...so I do not think this option is going to work - but thank you for the pointer.

            Do you have any knowledge on calling these DLL 's and how to implement it?
            If I can manage to get Alpha to "SEE" the DLL, would it be a good start for me. At this point am I doing something wrong with the declare statement...so I have nothing to start out with -

            I have been working through previous posts on DLL's yesterday until past midnight, but this one got me good !!

            Have a good day
            Regards
            Walter

            Comment


              #7
              Re: SA Bank Account Number Validation

              Walter,

              Take a look at this site.

              You can put the dll in the c:\windows\system folder and reference it just by name.
              Last edited by Marcel Kollenaar; 06-09-2009, 02:38 AM.
              Marcel

              I hear and I forget. I see and I remember. I do and I understand.
              ---- Confusius ----

              Comment


                #8
                Re: SA Bank Account Number Validation

                Hello Marcel,

                Thanks for the reply,

                I have added the cdvdll.dll file to the c:\windows\system folder

                I then declared the following:

                declare cdvdll cdv2 (I am having a problem assigning the argument types)

                This is what the documentation says about the cdv2 function:
                RETURNS:
                CDV_OK = 0;
                CDV_INVALIDBRANCHCODE = 1;
                CDV_FAIL = 2;
                CDV_INVALIDACCOUNTTYPE = 3;
                *)
                function CDV2( TSMFilename : pchar; // SORTED TSM900 data file (MUST BE SORTED!!!)
                BranchCode : pchar; // 6 digit branch code to validate
                AccountNo : pchar; // Account number to validate
                AccountType : integer // Account Type to validate (1=current,2=savings,3=transmission,4=bond,6=subscription share)
                ): integer; export; stdcall;
                What would the pchar equivalent be in xbasic?

                Regards
                Walter

                Comment


                  #9
                  Re: SA Bank Account Number Validation

                  Originally posted by Walter View Post
                  Hello Marcel,

                  Thanks for the reply,

                  I have added the cdvdll.dll file to the c:\windows\system folder

                  I then declared the following:

                  declare cdvdll cdv2 (I am having a problem assigning the argument types)

                  This is what the documentation says about the cdv2 function:


                  What would the pchar equivalent be in xbasic?

                  Regards
                  Walter
                  Use the C type. It is easyer to look at the VB examples and translate these. I saw you need some necessary structures. Use for these the DECLARESTRUCT or TYPE.... END TYPE

                  Try

                  Code:
                  DECLARE cdvdll CDV2 LCCCL
                  Last edited by Marcel Kollenaar; 06-09-2009, 03:57 AM.
                  Marcel

                  I hear and I forget. I see and I remember. I do and I understand.
                  ---- Confusius ----

                  Comment


                    #10
                    Re: SA Bank Account Number Validation

                    Hello Marcel,

                    Thanks for the help...

                    I was testing with the following, and at least get something back !!

                    declare cdvdll CDV2 CCCLL

                    Dim vN_Result as N
                    vN_Result = CDV2("c:\commercial\leadpol\Accountval\tsm900.srt","012342","144452227",1) '(1=current, 2 =savings, 3=transmission,4=share)
                    'return: 0=ok,1=invalid branch,2=fail,3=invalid acount type
                    It keeps on returning the same integer value (1) , but at least it is a start !@!

                    You mentioned I should use declarestruct .....ok

                    Also, every time I change something in my code, should I restart Alpha ? I think I saw that on your website earlier.

                    Regards
                    Walter

                    Comment


                      #11
                      Re: SA Bank Account Number Validation

                      Originally posted by Walter View Post
                      Hello Marcel,

                      Thanks for the help...

                      I was testing with the following, and at least get something back !!



                      It keeps on returning the same integer value (1) , but at least it is a start !@!

                      You mentioned I should use declarestruct .....ok

                      Also, every time I change something in my code, should I restart Alpha ? I think I saw that on your website earlier.

                      Regards
                      Walter
                      Especially when you change something in declarestructs, declare and type..end type constructions. Xbasic is an interpreter and rembers things....
                      Marcel

                      I hear and I forget. I see and I remember. I do and I understand.
                      ---- Confusius ----

                      Comment


                        #12
                        Re: SA Bank Account Number Validation

                        Marcel,

                        This one is working good, thanks
                        DECLARE cdvdll CDV2 LCCCL
                        Now I am getting the 0 - 3 result

                        Walter

                        Comment


                          #13
                          Re: SA Bank Account Number Validation

                          Marcel,

                          Thank you very much for helping out.
                          I appreciate it very much !

                          Regards
                          Walter

                          Comment


                            #14
                            Re: SA Bank Account Number Validation

                            :)
                            Marcel

                            I hear and I forget. I see and I remember. I do and I understand.
                            ---- Confusius ----

                            Comment


                              #15
                              Re: SA Bank Account Number Validation

                              Hi,

                              Is Alpha storing this DLL file somewhere?

                              Reason for asking:
                              I removed the trial version file from my computer (cdvdll.dll), restarted my computer, then started the Alpha program, it still picks the file up from somewhere when I run the udf calling this dll file.

                              I had the file saved in windows\system folder but removed it from there.

                              Any idea if this file would be saved somewhere by ALpha?

                              Regards
                              Walter

                              Comment

                              Working...
                              X