xp_startmail is documented as returning two code: 0 success, 1 failure.
It would be nice to check the return code.
When mail has already been started it returns a 1. This case appears
indistinguishable from a failure to start. (MSFT should have provided
separate return codes for failure-already started, and failure-cannot
start, but they did not.)
Does anyone know how to distinguish these cases. Text is printed
indicating that it has already been started but I don't know how to
programmatically grab this case.
It seems the conventional workaround is not to check the return code at
all (or to start mail once at server startup and never start it again).
Neither is ideal.
Suggestions?
Thanks,
Mark Andersen 5 2033
Hi
You don't say what your client is written in! ADO has an errors collection
that should contain the error, see the topic "Handling Errors and Messages
in ADO" for an overview.
John
"Mark" <ma**********@evare.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com... xp_startmail is documented as returning two code: 0 success, 1 failure. It would be nice to check the return code.
When mail has already been started it returns a 1. This case appears indistinguishable from a failure to start. (MSFT should have provided separate return codes for failure-already started, and failure-cannot start, but they did not.)
Does anyone know how to distinguish these cases. Text is printed indicating that it has already been started but I don't know how to programmatically grab this case.
It seems the conventional workaround is not to check the return code at all (or to start mail once at server startup and never start it again). Neither is ideal.
Suggestions?
Thanks, Mark Andersen
Hi
You don't say what your client is written in! ADO has an errors collection
that should contain the error, see the topic "Handling Errors and Messages
in ADO" for an overview.
John
"Mark" <ma**********@evare.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com... xp_startmail is documented as returning two code: 0 success, 1 failure. It would be nice to check the return code.
When mail has already been started it returns a 1. This case appears indistinguishable from a failure to start. (MSFT should have provided separate return codes for failure-already started, and failure-cannot start, but they did not.)
Does anyone know how to distinguish these cases. Text is printed indicating that it has already been started but I don't know how to programmatically grab this case.
It seems the conventional workaround is not to check the return code at all (or to start mail once at server startup and never start it again). Neither is ideal.
Suggestions?
Thanks, Mark Andersen
"You don't say what your client is written in!"
No client. This is a SQL Stored Procedure (invoked by a sql job, but
that is irrelevant) in which I wish to call xp_startmail and
distinguish between "failure, already started" and "failure, won't
start".
Did you test it in ADO or are you offering general advice?
Mark
"You don't say what your client is written in!"
No client. This is a SQL Stored Procedure (invoked by a sql job, but
that is irrelevant) in which I wish to call xp_startmail and
distinguish between "failure, already started" and "failure, won't
start".
Did you test it in ADO or are you offering general advice?
Mark
Hi
With ADO/ODBC occasions such as when a status of SQL_SUCCESS_WITH_INFO you
can get the messages and interogate them. The options seem to be assume
that SQLMail is running and not start it every time, or to explicity stop it
first ignoring any errors which it throws up.
You may want to look at: http://www.sqldev.net/xp/xpsmtp.htm as a different
way to send emails.
John
"Mark" <ma**********@evare.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com... "You don't say what your client is written in!"
No client. This is a SQL Stored Procedure (invoked by a sql job, but that is irrelevant) in which I wish to call xp_startmail and distinguish between "failure, already started" and "failure, won't start".
Did you test it in ADO or are you offering general advice?
Mark This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Ramsden |
last post by:
.... when the id 'junk' doesn't exist anywhere in the document,
instead of returning 'object'?!
I am using Javascript for a drop-down menu, slightly adapted from
one by Angus Turnbull (see...
|
by: thechaosengine |
last post by:
Hi all,
I have a property called GeneralStatus that can return an int between -1 and
3.
These values are represented by an enumeration called StatusEnum.
My question is, should my property...
|
by: Mark |
last post by:
xp_startmail is documented as returning two code: 0 success, 1 failure.
It would be nice to check the return code.
When mail has already been started it returns a 1. This case appears...
|
by: Sara Shoemaker |
last post by:
Hi all -
I am trying to launch a web browser from within my code for Linux.
The problem is that I am getting no failure code back when the browser
doesn't launch. (I'm trying to force a failure...
|
by: Michael Kennedy [UB] |
last post by:
Hi,
I am back with more bug reports from Visual Studio.NET 2003's C++ compiler
(unmanaged). Consider the following method:
---------------------------------------------
__forceinline
bool...
| |
by: yomgui |
last post by:
hello,
is it legal to return inside a for loop
or am I obliged to break out of the loop before returning ?
thanks
yomgui
|
by: cppquester |
last post by:
A colleague told me that there is a rule about good stype that a
function in C++ should have only one point of return (ie. return
statement). Otherwise there might be trouble.
I never heard about...
|
by: Marty James |
last post by:
Howdy,
I was reflecting recently on malloc.
Obviously, for tiny allocations like 20 bytes to strcpy a filename or
something, there's no point putting in a check on the return value of
malloc....
|
by: aarklon |
last post by:
Hi all,
see:-
http://linuxgazette.net/issue51/pramode.html
|
by: Joe Strout |
last post by:
Let me preface this by saying that I think I "get" the concept of duck-
typing.
However, I still want to sprinkle my code with assertions that, for
example, my parameters are what they're...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |