error telebank import bank statement

nightrod
Member Posts: 68
Hi,
when importing a bank statement using the
i got this message:
The value of COPYSTR parameter 2 is outside of the permitted range.
The current value is:0.
The permitted range is: from 1 to 2147483647.
using debugger i can see which line it is and where it stops.
everything looks normal.
anyone got an idea?
when importing a bank statement using the
i got this message:
The value of COPYSTR parameter 2 is outside of the permitted range.
The current value is:0.
The permitted range is: from 1 to 2147483647.
using debugger i can see which line it is and where it stops.
everything looks normal.
anyone got an idea?
0
Comments
-
Can you post the line of code? It seems that the second parameter is some expression like STRPOS searching for some char but the char is not in the value, thus returning 0...0
-
AccountNo := Acc; IF "Country Code"<>'' THEN EXIT(TRUE); Acc := CharacterFilter(UPPERCASE(Acc),Text1000031); BaseLen := STRLEN(Acc); IF (STRPOS(Acc, Text1000032) = 1) OR (STRPOS(Acc, Text1000033) = 1) THEN BEGIN FirstCharacter := Acc[1]; Acc := CharacterFilter(Acc,'0123456789'); IF BaseLen <> STRLEN(Acc)+1 THEN EXIT(FALSE); Len := STRLEN(Acc); IF (Len < 1) OR (Len > 7) THEN EXIT(FALSE); IF Len = 1 THEN IF Acc[1] = '0' THEN EXIT(FALSE); CLEAR(AccountNo); AccountNo[1] := FirstCharacter; AccountNo := AccountNo + Acc; EXIT(TRUE); END; Acc := DELCHR(Acc,'=',Text1000034); CASE STRLEN(Acc) OF 9:Acc:='00'+Acc; 10:Acc:=COPYSTR(Acc,1,1)+Acc; ELSE EXIT(FALSE) END; Res := (STRCHECKSUM(Acc,'55987654321',11)=0); IF Res THEN AccountNo := COPYSTR(Acc,12-BaseLen);// the error is here. BaseLen = 12 so 12-12 is zero.
0 -
Hi
Whats the value of Acc & Text1000031?
What kind of fileformat from the bank are you receiving?
It seems that either the file is corrupt or tha value of Acc are note parsed correctlyRegards
Dan Lindström
NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
MBSP Developer for Microsoft Dynamics NAV 20090 -
its a Swift MT940 protocoll.
the file doesnt look corrupt.0 -
It looks like
IF (STRPOS(Acc, Text1000032) = 1) OR (STRPOS(Acc, Text1000033) = 1)
is FALSE, thus skipping this branch and becauseBaseLen := STRLEN(Acc);
you have error in your last line... check, if really the Text1000032/33 are at first position in the Acc, may be there is some space or something before them, or there is CASE-SENSITIVE problem...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions