SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Coupling Outlook to SQL Server


Coupling Outlook to SQL Server

Author
Message
Kevin Terry
Kevin Terry
SSC Veteran
SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)

Group: General Forum Members
Points: 278 Visits: 269
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/kterry/couplingoutlooktosqlserver.asp



Dinesh Asanka
Dinesh Asanka
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1318 Visits: 223
seems to be a good article
but
is this query correct

CREATE TABLE [tblCpls] (
[cplNum] [int] NULL ,
[cplName] [varchar] (4000) NULL ,
[cplDesc] [varchar] (1000) NULL,
CONSTRAINT [PK_tblList] PRIMARY KEY CLUSTERED
(
[cplnum]
) ON [PRIMARY]
)
) ON [PRIMARY]
GO

how can u create a Clustered index on nullable column ??






My Blog: http://dineshasanka.spaces.live.com/
Dinesh Asanka
Dinesh Asanka
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1318 Visits: 223
I am really intersted on this article
but how can find those IDs in my enviroment

strOlStoreID = "18DE200A0C99D6DC800AA002FC45A06000000504B435654303100D"
strOlEntryID = "5B7D1118DE200A0C99D6DCCCBA91795B7D11145A06000000504B435654300000"






My Blog: http://dineshasanka.spaces.live.com/
Jamie Thomson
Jamie Thomson
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1279 Visits: 188

Great article Terry, I enjoyed reading it.

I'm interested in the following:

"I did come across a driver that could be used to directly access exchange as a linked server (I hoped)"

What driver was this?

Why did it not work?

Why is it limited to having Exchange and SQL Server on the same physical machine?



Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
Logicom (New York)
Logicom (New York)
SSC Rookie
SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)

Group: General Forum Members
Points: 34 Visits: 1
That's the "Exchange OLE-DB driver"; It has that and a number of other limitations. The example code Microsoft published in an MSDN article for using the driver has some glaring ommissions (e.g., the code snippets shown just plain will not work!!).

This article Kevin did is a good illustrative article of what is possible using ActiveX script in Microsoft SQL Server.

Between this article and the Lotus Notes ODBC driver article of a few days ago, I'd say this season is shaping up to be a SQL Server messaging extravaganza at SQL Server Central!!


Respectfully,

Steve
logicom-inc..com
Kevin Terry
Kevin Terry
SSC Veteran
SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)

Group: General Forum Members
Points: 278 Visits: 269
I am really intersted on this article
but how can find those IDs in my enviroment

strOlStoreID = "18DE200A0C99D6DC800AA002FC45A06000000504B435654303100D"
strOlEntryID = "5B7D1118DE200A0C99D6DCCCBA91795B7D11145A06000000504B435654300000"

----------------
First, yes you're right, that column should be not null (I just auto-generated a template of QA, and changed col names, without really looking at it).
If you navigate to the particular folder you're interested in, storeid and entryid are properties, accessible that way. Our resident outlook guru gave me the following code to get them (just cut and paste into notepad and save as vbs file, then run):

Dim objOutlook
Dim NmSpace
Dim myfld
Dim objFilesys
Dim objtxtfile
Dim txtIDS

Set objOutlook = WScript.CreateObject("Outlook.Application")

Set NmSpace = objOutlook.GetNameSpace("MAPI")

Set myfld = NmSpace.PickFolder

Set objFilesys = WScript.CreateObject("Scripting.FileSystemObject")

Set objtxtfile = objFilesys.CreateTextFile("C:\IDinfo.txt")

txtIDS = "The Store ID: " & myfld.StoreID & Chr(13) & Chr(10) & "The Entry ID: " & myfld.EntryID

WScript.Echo txtIDS

objtxtfile.WriteLine txtIDS


objtxtfile.Close



Martin Vrieze
Martin Vrieze
SSC-Addicted
SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)SSC-Addicted (452 reputation)

Group: General Forum Members
Points: 452 Visits: 125

Very good article Terry!!!

Do you know where to get properties/elements to be able to read data elements for the inbox?

Is is also possible to delete items in the inbox via ActiveX code from SQL Server?


Michael Teff
Michael Teff
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 2

Very Interesting and wonderful article.

But I have a question on the EntryID and StoreID. From the article, it is my understanding that you need the EntryID and StoreID of the Form that you want to query information on.

The script you posted here, wouldn't that just get the EntryID and StoreID of just the public folder. Or is that all we need.

Thanks.


Logicom (New York)
Logicom (New York)
SSC Rookie
SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)

Group: General Forum Members
Points: 34 Visits: 1
In answer to the Id questions: Outlook Spy!!

Dmitry Streblechenko offers an eval version.

Many developers use it...


Respectfully,

Steve
logicom-inc..com
Kevin Terry
Kevin Terry
SSC Veteran
SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)SSC Veteran (278 reputation)

Group: General Forum Members
Points: 278 Visits: 269
Whether or not you can delete probably has more to do w/ permissions than anything else, but yes there is a Delete method (and a Remove method, depending on what your trying to get rid of).

Outlook comes w/ an object model available under Help (at least w/ Outlook 2003 which we have here), which gives you all properties, methods, objects etc.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search