• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 640
  • Last Modified:

ics file doesn't work in outlook 2003 if generated by sql server

Hi,

I have two ics files attached to this post.  One that works in Outlook 2003 that was created in Outlook 2003.  The other one is created using a sql server stored procedure and the format is the same, but it will not open in Outlook 2003.  How can I get this to work?   I need this to be automated because I am dynamically pulling dates into the ics file and emailing the file out with the stored procedure.   I've tested the files on multiple machines that have Outlook 2003, so it's not just one machine that is having a problem.  The files work fine on Outlook 2007.

Thanks,
Josephine
latest.ics.txt
latest-sql-gen.ics.txt
0
sqlqueen
Asked:
sqlqueen
  • 4
  • 2
1 Solution
 
radcaesarCommented:
Download a good HEXEditor

Open your files in that HEXEditor and compare the results.

I had checked in an online HEX editor and dont think both files are same.
0
 
sqlqueenAuthor Commented:
I downloaded a HEXEditor and I see what you mean, but I am uncertain of how I can fix this problem.

this is what outlook 2003 is creating:
BEGIN:VCALENDAR..VERSION:2.0..METHOD:PUBLISH..BEGIN:VEVENT..DTSTART;VALUE=DATE:20110528..DTEND;VALUE=DATE:20110530..LOCATION:ooo

this is what sql server is creating: ÿþB.E.G.I.N.:.V.C.A.L.E.N.D.A.R.....V.E.R.S.I.O.N.:.2...0.....M.E.T.H.O.D.:.P.U.B.L.I.S.H.....B.E.G.I.N.:.V.E.V.E.N.T.....D.T.S.T.A.R.T.;.V.A.L.U.E.=.D.A.T.E.:.2.0.1.1.0.4.2.3.....D.T.E.N.D.;.V.A.L.U.E.=.D.A.T.E.:.2.0.1.1.0.4.2.8.....L.O.C.A.T.I.O.N.:.o.o.o

this the sql code i am using:
DECLARE @strPrint VARCHAR(2);
PRINT ''BEGIN:VCALENDAR'';
SET @strPrint = @strPrint + CHAR(13);
PRINT ''VERSION:2.0'';
SET @strPrint = @strPrint + CHAR(13);
PRINT ''METHOD:PUBLISH'';
SET @strPrint = @strPrint + CHAR(13);
PRINT ''BEGIN:VEVENT'';
SET @strPrint = @strPrint + CHAR(13);
PRINT ''DTSTART;VALUE=DATE:'' + @icsstartdate;
SET @strPrint = @strPrint + CHAR(13);
PRINT ''DTEND;VALUE=DATE:'' + @icsenddate;
SET @strPrint = @strPrint + CHAR(13);
PRINT ''LOCATION:ooo'';

do you know any way that I could change this to make it create the file exactly the same way as Outlook 2003?

thanks,
josephine
0
 
radcaesarCommented:
Since you said that one of the file was created using an SP, you need to check that one.

Why do you want to use SP for this? What is your exact requirement of using the SP to create it.
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
sqlqueenAuthor Commented:
Hi,
I am not sure what in the SP is causing the file to be created with extra periods.  I guess I will just have to fiddle around with it.

I want to use a SP for this since I need to create an ICS file on the fly basically.  A vacation request is approved and then I need to send a meeting request so the manager can put it on their calendar.  I am not certain of another way to do this.  

Thanks,
Josephine
0
 
sqlqueenAuthor Commented:
Hi,

So, the solution that I came up with is this --

modifying the sp_send_dbmail with this line:
@ANSI_Attachment BIT = 0

and then adding this line to my sp that is calling sp_send_dbmail:
@ansi_attachment = 1

Now, I have a sql generated ICS file that will work in both Outlook 2003 and Outlook 2007
0
 
sqlqueenAuthor Commented:
Hi,  Can I be awarded points for solving my own problem?  
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now