dbTalk Databases Forums  

ActiveX Script with CDOEX problem

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss ActiveX Script with CDOEX problem in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
 
Posts: n/a

Default ActiveX Script with CDOEX problem - 08-02-2005 , 02:59 AM






Working on an automation of MS Exchane Server 2003, I have to create appointments (with CDOEX) in a DTS ActiveX Script (see below).

Do Until Rst.Eof
Set Appt = CreateObject("CDO.Appointment")
With Appt
.AllDayEvent = True
.StartTime = Rst.Fields("datum").Value
.EndTime = CDate(Clng(Rst.Fields("datum").Value) + 1)
.BusyStatus = "Free"
.Subject = Rst.Fields("Subject").Value
.GEOLatitude = Cdbl(-1)'Cdbl(dblFlag)
.GEOLongitude = Cdbl(-1)'Cdbl(dblFlag)
'ExCon.Open Mbx.BaseFolder
.DataSource.SaveToContainer Mbx.Calendar, ExCon
.Fields("http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/0x8214").Value = CLng(Rst.Fields("label").Value)
appt.Fields.Update
appt.DataSource.Save
'ExCon.Close
End With
Rst.MoveNext
lngAppt = lngAppt + 1
Loop

This is executed as it should, with exception of the two lines were we set GEOLongitude and GEOLatitude.

Running this exact same script with wscript (so not in a DTS ActiveX Script task) works perfectly (including GEOLongitude and GEOLatitude).

Anyone the slightest idea what this is about?


************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Reply With Quote
  #2  
Old   
Ilya Margolin
 
Posts: n/a

Default Re: ActiveX Script with CDOEX problem - 08-04-2005 , 08:25 AM






Would flipping flag 'Execute on main package thread' help?

Ilya

wrote in message news:uyLSZgzlFHA.320 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
Working on an automation of MS Exchane Server 2003, I have to create
appointments (with CDOEX) in a DTS ActiveX Script (see below).

Do Until Rst.Eof
Set Appt = CreateObject("CDO.Appointment")
With Appt
.AllDayEvent = True
.StartTime = Rst.Fields("datum").Value
.EndTime = CDate(Clng(Rst.Fields("datum").Value) +
1)
.BusyStatus = "Free"
.Subject = Rst.Fields("Subject").Value
.GEOLatitude = Cdbl(-1)'Cdbl(dblFlag)
.GEOLongitude = Cdbl(-1)'Cdbl(dblFlag)
'ExCon.Open Mbx.BaseFolder
.DataSource.SaveToContainer Mbx.Calendar, ExCon

..Fields("http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-00000
0000046}/0x8214").Value = CLng(Rst.Fields("label").Value)
Quote:
appt.Fields.Update
appt.DataSource.Save
'ExCon.Close
End With
Rst.MoveNext
lngAppt = lngAppt + 1
Loop

This is executed as it should, with exception of the two lines were we set
GEOLongitude and GEOLatitude.

Running this exact same script with wscript (so not in a DTS ActiveX
Script task) works perfectly (including GEOLongitude and GEOLatitude).

Anyone the slightest idea what this is about?


************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.