Exchange 2003 Public Calendar to a Web Page with ADO
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
Exchange 2003 Public Calendar to a Web Page with ADO

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
430
Guest





Posted: Mon Nov 29, 2004 3:33 pm    Post subject: Exchange 2003 Public Calendar to a Web Page with ADO Reply with quote

Hello,

I used the example code located here -

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_clb_rendering_a_calendar_to_a_web_page_with_cdoex_vbs.asp

- as a basis for printing a calendar to an ASP web page. Under Exchange
2000, this works (both the example and my eventual code).

At this URL is the following code:
<!--
'Render calendar to a Web page with ADO
'This sample renders a calendar to a Web page using ADO
-->

<!--
'Build Instructions:
'1) Create a folder named "test" under inetpub/wwwroot.
'2) Save the following file in that folder with the mentioned name.
'3) Make the changes to the above file i.e. Change the calendarURL variable
to reflect your mailbox and domain.
'4) Save the file.
'5) Open internet service manager and browse to the "test" folder.
'6) Right-click and go to properties.
'7) Go to the "Directory Security" tab.
'8) Click on "Edit" button next to the "handshake" icon.
'9) Uncheck "Anonymous Access".
'10) Check the "Basic authentication", "Digest authentication", and
"Integrated Windows authentication".
'11) Click ok.
'12) Click ok.
'13) Load the asp in the browser.
-->

<%@ Language=VBScript%>
<%
Dim CalendarURL
Dim Rs
Dim Rec
Dim strSubject
Dim strStartTime
Dim strEndTime
Dim strLocation

Set Rs = CreateObject("ADODB.RecordSet")
Set Rec = CreateObject("ADODB.Record")

CalendarURL =
"file://./backofficestorage/somedomain.example.com/MBX/user1/calendar/"

Rec.Open CalendarURL

Set Rs.ActiveConnection = Rec.ActiveConnection
Rs.Source = "SELECT ""DAV:href"", " & _
" ""urn:schemas:httpmail:subject"", " & _
" ""urn:schemas:calendar:dtstart"", " & _
" ""urn:schemas:calendar:dtend"", " & _
" ""urn:schemas:calendar:location"" " & _
"FROM scope('shallow traversal of """ & CalendarURL & """')
" & _
"WHERE (""urn:schemas:calendar:dtstart""
Quote:
=CAST(""2000-01-01T08:00:00Z"" as 'dateTime')) " & _
"AND (""urn:schemas:calendar:dtend""

<=CAST(""2000-01-31T08:00:00Z"" as 'dateTime'))"


Rs.Open
Rs.MoveFirst
Response.Write "<TABLE border=1>"
Response.Write "<TR><TD>Subject</TD><TD>Start Time</TD><TD>End
Time</TD><TD>Location</TD></TR>"
Do Until Rs.EOF
strSubject = Rs.Fields("urn:schemas:httpmail:subject").Value
strStartTime = Rs.Fields("urn:schemas:calendar:dtstart").Value
strEndTime = Rs.Fields("urn:schemas:calendar:dtend").Value
strLocation = Rs.Fields("urn:schemas:calendar:location").Value

response.write "<TR><TD>" & strSubject & "</TD><TD>" & strStartTime
& "</TD><TD>" & strEndTime & "</TD><TD>" & strLocation & "</TD></TR>"
Rs.MoveNext
Loop
Response.Write "</TABLE>"
Set Rs = Nothing
Set Rec = Nothing
%>

However, since upgrading to Exchange 2003, this example (and my code) does
not work. it gets the following error:
Microsoft OLE DB Provider For Exchange error '80550023'
Submitted SQL statement was incomplete.

(It falls over at the SQL SELECT section.)

Does anyone have any ideas as to what has changed?

Thanks very much.

Back to top
TulsaML
Guest





Posted: Tue Nov 30, 2004 10:25 am    Post subject: RE: Exchange 2003 Public Calendar to a Web Page with ADO Reply with quote

I too am fighting this problem. Since updating to Exchange 2003, all code
relating to this is broken. However, I've been looking at the URL more then
the select statement. Exchange 2003 is set to use WebForms and thus is
requiring a form-based login for anyone even trying to access a public
folder. I'm not even getting the SQL error.


"430" wrote:

Quote:
Hello,

I used the example code located here -

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_clb_rendering_a_calendar_to_a_web_page_with_cdoex_vbs.asp

- as a basis for printing a calendar to an ASP web page. Under Exchange
2000, this works (both the example and my eventual code).

At this URL is the following code:
!--
'Render calendar to a Web page with ADO
'This sample renders a calendar to a Web page using ADO
--

!--
'Build Instructions:
'1) Create a folder named "test" under inetpub/wwwroot.
'2) Save the following file in that folder with the mentioned name.
'3) Make the changes to the above file i.e. Change the calendarURL variable
to reflect your mailbox and domain.
'4) Save the file.
'5) Open internet service manager and browse to the "test" folder.
'6) Right-click and go to properties.
'7) Go to the "Directory Security" tab.
'8) Click on "Edit" button next to the "handshake" icon.
'9) Uncheck "Anonymous Access".
'10) Check the "Basic authentication", "Digest authentication", and
"Integrated Windows authentication".
'11) Click ok.
'12) Click ok.
'13) Load the asp in the browser.
--

%@ Language=VBScript%
%
Dim CalendarURL
Dim Rs
Dim Rec
Dim strSubject
Dim strStartTime
Dim strEndTime
Dim strLocation

Set Rs = CreateObject("ADODB.RecordSet")
Set Rec = CreateObject("ADODB.Record")

CalendarURL =
"file://./backofficestorage/somedomain.example.com/MBX/user1/calendar/"

Rec.Open CalendarURL

Set Rs.ActiveConnection = Rec.ActiveConnection
Rs.Source = "SELECT ""DAV:href"", " & _
" ""urn:schemas:httpmail:subject"", " & _
" ""urn:schemas:calendar:dtstart"", " & _
" ""urn:schemas:calendar:dtend"", " & _
" ""urn:schemas:calendar:location"" " & _
"FROM scope('shallow traversal of """ & CalendarURL & """')
" & _
"WHERE (""urn:schemas:calendar:dtstart""
=CAST(""2000-01-01T08:00:00Z"" as 'dateTime')) " & _
"AND (""urn:schemas:calendar:dtend""
=CAST(""2000-01-31T08:00:00Z"" as 'dateTime'))"


Rs.Open
Rs.MoveFirst
Response.Write "<TABLE border=1>"
Response.Write "<TR><TD>Subject</TD><TD>Start Time</TD><TD>End
Time</TD><TD>Location</TD></TR>"
Do Until Rs.EOF
strSubject = Rs.Fields("urn:schemas:httpmail:subject").Value
strStartTime = Rs.Fields("urn:schemas:calendar:dtstart").Value
strEndTime = Rs.Fields("urn:schemas:calendar:dtend").Value
strLocation = Rs.Fields("urn:schemas:calendar:location").Value

response.write "<TR><TD>" & strSubject & "</TD><TD>" & strStartTime
& "</TD><TD>" & strEndTime & "</TD><TD>" & strLocation & "</TD></TR>"
Rs.MoveNext
Loop
Response.Write "</TABLE>"
Set Rs = Nothing
Set Rec = Nothing
%

However, since upgrading to Exchange 2003, this example (and my code) does
not work. it gets the following error:
Microsoft OLE DB Provider For Exchange error '80550023'
Submitted SQL statement was incomplete.

(It falls over at the SQL SELECT section.)

Does anyone have any ideas as to what has changed?

Thanks very much.


Back to top
Tom Rizzo [MSFT]
Guest





Posted: Wed Dec 01, 2004 12:22 pm    Post subject: Re: Exchange 2003 Public Calendar to a Web Page with ADO Reply with quote

Is this Exchange 2003 with SP1?

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp



"430" <430@discussions.microsoft.com> wrote in message
news:EFBCED01-A334-44DB-8711-B79DBBF1E8CE@microsoft.com...
Quote:
Hello,

I used the example code located here -

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_clb_rendering_a_calendar_to_a_web_page_with_cdoex_vbs.asp

- as a basis for printing a calendar to an ASP web page. Under Exchange
2000, this works (both the example and my eventual code).

At this URL is the following code:
!--
'Render calendar to a Web page with ADO
'This sample renders a calendar to a Web page using ADO
--

!--
'Build Instructions:
'1) Create a folder named "test" under inetpub/wwwroot.
'2) Save the following file in that folder with the mentioned name.
'3) Make the changes to the above file i.e. Change the calendarURL
variable
to reflect your mailbox and domain.
'4) Save the file.
'5) Open internet service manager and browse to the "test" folder.
'6) Right-click and go to properties.
'7) Go to the "Directory Security" tab.
'8) Click on "Edit" button next to the "handshake" icon.
'9) Uncheck "Anonymous Access".
'10) Check the "Basic authentication", "Digest authentication", and
"Integrated Windows authentication".
'11) Click ok.
'12) Click ok.
'13) Load the asp in the browser.
--

%@ Language=VBScript%
%
Dim CalendarURL
Dim Rs
Dim Rec
Dim strSubject
Dim strStartTime
Dim strEndTime
Dim strLocation

Set Rs = CreateObject("ADODB.RecordSet")
Set Rec = CreateObject("ADODB.Record")

CalendarURL =
"file://./backofficestorage/somedomain.example.com/MBX/user1/calendar/"

Rec.Open CalendarURL

Set Rs.ActiveConnection = Rec.ActiveConnection
Rs.Source = "SELECT ""DAV:href"", " & _
" ""urn:schemas:httpmail:subject"", " & _
" ""urn:schemas:calendar:dtstart"", " & _
" ""urn:schemas:calendar:dtend"", " & _
" ""urn:schemas:calendar:location"" " & _
"FROM scope('shallow traversal of """ & CalendarURL & """')
" & _
"WHERE (""urn:schemas:calendar:dtstart""
=CAST(""2000-01-01T08:00:00Z"" as 'dateTime')) " & _
"AND (""urn:schemas:calendar:dtend""
=CAST(""2000-01-31T08:00:00Z"" as 'dateTime'))"


Rs.Open
Rs.MoveFirst
Response.Write "<TABLE border=1>"
Response.Write "<TR><TD>Subject</TD><TD>Start Time</TD><TD>End
Time</TD><TD>Location</TD></TR>"
Do Until Rs.EOF
strSubject = Rs.Fields("urn:schemas:httpmail:subject").Value
strStartTime = Rs.Fields("urn:schemas:calendar:dtstart").Value
strEndTime = Rs.Fields("urn:schemas:calendar:dtend").Value
strLocation = Rs.Fields("urn:schemas:calendar:location").Value

response.write "<TR><TD>" & strSubject & "</TD><TD>" & strStartTime
& "</TD><TD>" & strEndTime & "</TD><TD>" & strLocation & "</TD></TR>"
Rs.MoveNext
Loop
Response.Write "</TABLE>"
Set Rs = Nothing
Set Rec = Nothing
%

However, since upgrading to Exchange 2003, this example (and my code) does
not work. it gets the following error:
Microsoft OLE DB Provider For Exchange error '80550023'
Submitted SQL statement was incomplete.

(It falls over at the SQL SELECT section.)

Does anyone have any ideas as to what has changed?

Thanks very much.




Back to top
TulsaML
Guest





Posted: Thu Dec 02, 2004 12:09 am    Post subject: Re: Exchange 2003 Public Calendar to a Web Page with ADO Reply with quote

Mine is just plain Exchange. However, I am planning to upgrade to SP1 today.

Mark

"Tom Rizzo [MSFT]" wrote:

Quote:
Is this Exchange 2003 with SP1?

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp



"430" <430@discussions.microsoft.com> wrote in message
news:EFBCED01-A334-44DB-8711-B79DBBF1E8CE@microsoft.com...
Hello,

I used the example code located here -

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_clb_rendering_a_calendar_to_a_web_page_with_cdoex_vbs.asp

- as a basis for printing a calendar to an ASP web page. Under Exchange
2000, this works (both the example and my eventual code).

At this URL is the following code:
!--
'Render calendar to a Web page with ADO
'This sample renders a calendar to a Web page using ADO
--

!--
'Build Instructions:
'1) Create a folder named "test" under inetpub/wwwroot.
'2) Save the following file in that folder with the mentioned name.
'3) Make the changes to the above file i.e. Change the calendarURL
variable
to reflect your mailbox and domain.
'4) Save the file.
'5) Open internet service manager and browse to the "test" folder.
'6) Right-click and go to properties.
'7) Go to the "Directory Security" tab.
'8) Click on "Edit" button next to the "handshake" icon.
'9) Uncheck "Anonymous Access".
'10) Check the "Basic authentication", "Digest authentication", and
"Integrated Windows authentication".
'11) Click ok.
'12) Click ok.
'13) Load the asp in the browser.
--

%@ Language=VBScript%
%
Dim CalendarURL
Dim Rs
Dim Rec
Dim strSubject
Dim strStartTime
Dim strEndTime
Dim strLocation

Set Rs = CreateObject("ADODB.RecordSet")
Set Rec = CreateObject("ADODB.Record")

CalendarURL =
"file://./backofficestorage/somedomain.example.com/MBX/user1/calendar/"

Rec.Open CalendarURL

Set Rs.ActiveConnection = Rec.ActiveConnection
Rs.Source = "SELECT ""DAV:href"", " & _
" ""urn:schemas:httpmail:subject"", " & _
" ""urn:schemas:calendar:dtstart"", " & _
" ""urn:schemas:calendar:dtend"", " & _
" ""urn:schemas:calendar:location"" " & _
"FROM scope('shallow traversal of """ & CalendarURL & """')
" & _
"WHERE (""urn:schemas:calendar:dtstart""
=CAST(""2000-01-01T08:00:00Z"" as 'dateTime')) " & _
"AND (""urn:schemas:calendar:dtend""
=CAST(""2000-01-31T08:00:00Z"" as 'dateTime'))"


Rs.Open
Rs.MoveFirst
Response.Write "<TABLE border=1>"
Response.Write "<TR><TD>Subject</TD><TD>Start Time</TD><TD>End
Time</TD><TD>Location</TD></TR>"
Do Until Rs.EOF
strSubject = Rs.Fields("urn:schemas:httpmail:subject").Value
strStartTime = Rs.Fields("urn:schemas:calendar:dtstart").Value
strEndTime = Rs.Fields("urn:schemas:calendar:dtend").Value
strLocation = Rs.Fields("urn:schemas:calendar:location").Value

response.write "<TR><TD>" & strSubject & "</TD><TD>" & strStartTime
& "</TD><TD>" & strEndTime & "</TD><TD>" & strLocation & "</TD></TR>"
Rs.MoveNext
Loop
Response.Write "</TABLE>"
Set Rs = Nothing
Set Rec = Nothing
%

However, since upgrading to Exchange 2003, this example (and my code) does
not work. it gets the following error:
Microsoft OLE DB Provider For Exchange error '80550023'
Submitted SQL statement was incomplete.

(It falls over at the SQL SELECT section.)

Does anyone have any ideas as to what has changed?

Thanks very much.





Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
Contact Us
New Topics Powered by phpBB