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:
00951108
Views:
19
Frank,

I assume, you're using this array in the function, which sends mails, right?

Can you post relevant piece of that function?

I was suggesting to forget about SQL for a moment and try to retrive the body of e-mail using seek command, e.g.
if seek(m.tcMailID, "MAIL_BODY","Parent_ID")
    laJunk[1,1]=Mail_Body.Mail
else 
  * Error processing
endif
You need to find the root of the problem. it could be a corrupted table, or difference in ID & Parent_ID fields, etc.

BTW, the name ID is not a really good name for a field. MailID would be much better.



>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-(
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform