all groups > iis smtp nntp > november 2005 >
You're in the

iis smtp nntp

group:

Schemas used by CDO


Schemas used by CDO Russell Hardie
11/22/2005 10:04:30 AM
iis smtp nntp: Is it possible (or the right solution) to have local copies of the
following:
http://Schemas/microsoft.com/cdo/configuration/sendusing , etc..... on your
webserver?

I have a SQL Server DTS package that sends CDO based emails. This package
has always run fine\until 3 days ago the ISP made a policy change to stop
internal servers from accessing the WWW. This breaks my DTS job as I need to
touch microsoft to configure the CDO.Message remote server info.

I have only found one other possible solution of referencing METADATA tags
or the cdosys.dll directly, but this does not seem to work within DTS
package ActiveX scripts. So I thought if there was a way to host these
"schema" files on the local webserver, maybe I could solve my problem?

I realize this is not a DTS or SQL Server group, but as your expertise is in
IIS/SMTP I thought maybe someone here could advise.

Thanks,
Russell


Re: Schemas used by CDO Egbert Nierop (MVP for IIS)
11/24/2005 12:00:00 AM

[quoted text, click to view]

This is really the way to do it...

[quoted text, click to view]

You can pack script as a script package, which also can reference typelibs.
I'm not sure however, if you can paste this code in a vbs file or only in a
..wsf file. If so, just make the vbs extension equal to .wsf :)

<reference object="ADODB.Connection.2.8"/>
<registration progid="ADOScriptlet"/>
<public>
<property name="cnnstate"/>
<method name="openConnection"/>
<method name="closeConnection"/>
</public>

<script language="VBScript">
<![CDATA[
Dim cnn
Dim cnnState
Function openConnection()
Set cnn = CreateObject("ADODB.Connection")
cnn.ConnectionString = "driver={SQL Server};server=<enterserver>;" & _
"uid=<enterlogon>;pwd=<enterpassword>;database=<enterdatabase>"
cnn.Open
If cnn.State = adStateOpen Then
cnnState = "open"
Else
cnnState = "closed"
End If
End Function

Function closeConnection()
cnn.Close
cnnState = "closed"
End Function
]]>
</script>



[quoted text, click to view]
AddThis Social Bookmark Button