The length of the source exceeds the size of the destination

Cindy_PretCindy_Pret Member Posts: 8
I've got a field "File Hyperlink" with a path saved in it. When I lookup I get the error below. Why would that be? What am I doing wrong?


Error Message:
Microsoft Business Solutions-Navision
The length of the source exceeds the size of the destination buffer.

OK

Variables:

CommonDialogMgt Codeunit Common Dialog Management
tFileName Text 512
InitPath Text 512
FH Text 1024
Text50000 c:\windows\Explorer.exe


Code:
IF "File Hyperlink" <> '' THEN BEGIN
FH := STRSUBSTNO('%1%2',"File Hyperlink","File Hyperlink Extended");
SHELL(Text50000, FH);
END ELSE BEGIN
InitPath := '\\itsnav410\TestServer\Call Attachments\' + "Call ID" + '\*.*';
FH :=
CommonDialogMgt.OpenFile('Documents',InitPath,4,'All Files (*.*)|*.*', 1);
IF InitPath = FH THEN BEGIN
"File Hyperlink" := ''
END ELSE BEGIN
VALIDATE("File Hyperlink",COPYSTR(FH,1,250));
VALIDATE("File Hyperlink Extended",COPYSTR(FH,251));
END;
END;

Comments

  • hxrhxr Member Posts: 20
    Hi,

    Did you try to turn on debuger and see where it stops on error?

    hxr
  • Cindy_PretCindy_Pret Member Posts: 8
    Yes. It stops at the shell part
  • krikikriki Member, Moderator Posts: 9,110
    I think it is best that you put your commandstring and your parameterstring together to run the SHELL.
    Or even better then SHELL : http://www.mibuso.com/forum/viewtopic.php?t=12417
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • sajidhanifkhansajidhanifkhan Member Posts: 182
    Hi Cindy ,

    The error you menitioned
    Error Message:
    Microsoft Business Solutions-Navision
    The length of the source exceeds the size of the destination buffer.

    You can try one thing in the data port properties just change ShowStatus in the data port properties to No .

    I hope this will solve your problem.
    Regards,
  • miganggarrodmiganggarrod Member Posts: 7
    [Inappropriate/Offensive text removed by Moderator.]

    [Non-English text (besides in the forums where it is allowed) is not allowed.]
    Please see Forum Rule(s) #2 and 3.4: Forum Rules.
Sign In or Register to comment.