Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record not available
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00950780
Message ID:
00951099
Views:
23
Nadya,

>
> I agree with Borislav and also avoid using single letters like
> a and b, put ml for MAILS and mb for MAIL_BODY or use these names
> as they are. Also is your ID a character field?
>

In order to track this down I have build a two step approach. First try to load the mail the old way and if that fails, try as suggested.
select nvl(B.Mail, ccMailNoBodyText) as MAIL, A.ACCOUNT ;
 from MAILS A left outer join ccMailBodyAlias B ;
   on B.PARENT_ID = A.ID;
     where A.ID = tcMailID;
       into array laJunk
          
 if _Tally > 0 and laJunk[1,1] = ccMailNoBodyText 
    *-- This one missed. the head-record is there but the
    *-- body is missing. Try another way 

    select ;
     nvl(MAIL_BODY.MAIL, ccMailNoBodyText) as MAIL, ;
     MAILS.ACCOUNT ;
      from MAILS  left outer join MAIL_BODY ;
        on MAILS.ID = MAIL_BODY.PARENT_ID;
           where MAILS.ID = tcMailID;
            into array laJunk
        
    *-- And keep something for the protocol
    this.cErrorText = "LoadMessage, 2. Try"+ CRLF
               
endif               
    
*-- One or the other hits at least found the head-Record    
if _tally > 0
    lcMailText = laJunk[1,1]
    lcAccountID= laJunk[1,2]

    if empty(lcMailText) or lcMailText = ccMailNoBodyText
        this.cErrorText = this.cErrorText + ;
                          "Body missing ("+ trans(set("Refresh",1)) +","+ trans(set("Refresh",2)) +")"
        llRetVal     = .F.
    endif
endif
But still. I just had another mail that could not be sent (with "Body Missing" in the protocol) while I can easily open another vfp-instance and run one of the two requests and do get the data.

It must be some network-issue. but I have no clue 8-(
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform