SendObject **保留错误**(循环失败) [英] SendObject **Reserved Error** (Fails in Loop)

查看:60
本文介绍了SendObject **保留错误**(循环失败)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我在这里使用了一些人的帮助,以使下面的代码正常运行。它已经运行了一段时间。现在,当我使用下面的代码发送电子邮件时,我有时会收到保留错误,并且不再发送任何电子邮件。请帮忙,让我知道我需要做些什么来解决这个问题。

展开 | 选择 | Wrap < span class =codeDivider> | 行号

解决方案

< blockquote>你好再尼克。在我看不到任何明显的东西之前检查了你的代码。我想知道是否有可能有一个零长度的电子邮件发送地址导致SENDOBJECT失败?如果它完全可能使用IF,你可以防止这种情况:

展开 | 选择 | Wrap < span class =codeDivider> | 行号


感谢您的支持答复。两者都不太可能,因为我已经设置了查询,以便在循环运行之前过滤出空字段的可能性。


我确实发现了一些东西......先是一点背景。


当我运行报告时,我通过分支机构运行它们。在给定的报告运行中,我运行2-4个分支。这是通过电子邮件运行之前的表单上的下拉菜单选择的。然后,这将生成电子邮件表单的数据。


当我为第一个分支发送电子邮件时,它每次都会成功发送。如果我然后更改分支并重新发送它在前几封电子邮件后失败。


但是,如果我退出数据库程序并返回,我可以成功发送另一个分支(就好像这是第一个分支跑)。如果我尝试发送另一个分支,它会在前几个分支后失败。


第一次运行后某些东西是否可能无法正常关闭?是否有代码每次重新开始,或类似的东西?


任何帮助表示赞赏。


NICK

嗨尼克。如果您可以发布执行选择和分支位的代码,那么这将非常有用。确实存在一种可能性,即当您选择要生成的下一组电子邮件时,代码中的某些内容未正确关闭或重新设置为已知状态。


干杯


Stewart


OK, So i have used the help of a few people on here to get the code below running properly. It has run great for a little while. Now when I send emails using code below, I sometimes get a Reserved Error and it does not send any more emails. Please help and let me know what I need to do to fix this.

Expand|Select|Wrap|Line Numbers

解决方案

Hi again Nick. Having reviewed your code before I can''t see anything obvious. I am wondering if there is any chance of having a zero-length e-mail sendto address causing a SENDOBJECT failure? You can guard against this if it is at all likely using an IF:

Expand|Select|Wrap|Line Numbers


Thank you for the reply. Both are unlikely because I have set up queries that filter out the possibility of empty fields prior to the loop running.

I did discover something...A little background first.

When I run my reports, I run them by branches. In a given report run I run 2-4 branches. This is selected by a drop down menu on the form prior to the email run. This then generates the data for the email form.

When I send emails for the first branch it sends succesfully everytime. If I then change branches and resend it fails after the first few emails.

However, If I exit out of the DB program and go back in I can send another branch successfully (as if it was the first branch ran). If I try to send another branch it fails after the first few.

Is it possible that something doesnt properly close out after the first run? Is there a code to do a fresh start each time, or something like it?

Any help is appreciated.

NICK


Hi Nick. If you could post the code that does the selection and branching bits you mention this would be very helpful. A possibility is indeed that something within the code is not closed properly or set back to a known state when you select the next set of e-mails to generate.

Cheers

Stewart


这篇关于SendObject **保留错误**(循环失败)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆