SetHeader is a method, not a property - so, I think that's where the problem
lies. Here's a snip from one of my many books regarding automation methods:
==================================
sp_OAMethod
You can use this stored procedure to execute a method of the object
specified by objecttoken:
sp_OAMethod objecttoken,
method
[, returnvalue OUTPUT]
[, [@parametername =] parameter [OUTPUT] [...n]]
If the method is a function, the stored procedure can access a return value.
At the end of the stored procedure's parameter list, you should list the
parameters of the code components. The direction of the parameters is
controlled by the OUTPUT keyword in the usual Transact-SQL manner.
Parameters can be passed both by position and by name. If passed by name,
the parametername (when the '@' sign is removed) must match the name of the
parameter in the code component.
During execution, sp_OAMethod converts Transact-SQL datatypes to OLE
Automation datatypes.
==================================
More comments below:
----- Original Message -----
From: "Tom Langer" <[EMAIL PROTECTED]>
To: "inFusion Support List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 3:47 PM
Subject: Re: [iMS] imsMail COM Object in SQL7
> I was hoping someone had some idea of the sql usage.
>
> is it possible to make it a single parameter instead of 2??
>
That would be counterproductive. It's very easy to call a method with the
header name and value all at once.
> EXEC @hr = sp_OASetProperty @object, 'smtpto','[EMAIL PROTECTED]'
> EXEC @hr = sp_OASetProperty @object, 'setHeader_To','[EMAIL PROTECTED]'
>
> If you added a bunch more properties, instead of using the properties
> collection, then it would be a little more compatible with something like
> SQL :-)
>
> Either that, or make the SetHeader and GetHeader a method that returns a
> value
>
All methods in an Automation Object return value. Of course, the return
value from this method is not significant.
> x = GetHeader("To")
> this returns whatever the To header is set to
> or
>
I'm not sure there is really a need for this function...
> x = SetHeader("To","[EMAIL PROTECTED]")
> this woudl set the To header to [EMAIL PROTECTED], doesn't need to return
> anything.
>
That's how it works now.
> So, if GetHeader and SetHeader are methods, SQL could use them without a
> problem, and would be used very similar to the way you are doing it now
(but
> you seem to be using a property collection, which again, sql doesn't seem
to
> support).
>
SetHeader is definitely a method...
> My input - hopefully it's possible!
>
Anything is possible (probable is another thing altogether :-)
Regards,
Howie
> cya
>
> Tom
>
========================================================================
This list server is Powered by iMS
'The Swiss Army Knife of Mail Servers'
--------------------------------------
To leave this list please complete the form at
http://www.coolfusion.com/iMSSupport.cfm
Need an iMS Developer license? Sign up for a free license here:
http://www.coolfusion.com/iMSDevelopers.cfm
List archives: http://www.mail-archive.com/infusion-email%40eoscape.com/
========================================================================