Coupling Outlook to SQL Server

  • Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/kterry/couplingoutlooktosqlserver.asp

  • 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/

  • 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/

  • 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?

     

  • 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

  • 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

  • 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?

     

     

  • 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.

  • In answer to the Id questions: Outlook Spy!!

    Dmitry Streblechenko offers an eval version.

    Many developers use it...


    Respectfully,

    Steve
    logicom-inc..com

  • 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.

  • The script posted above will open a window that will allow you to select any folder (public folders, inbox, folders within inbox, etc). Then give you the store and entry IDs of whatever you selected.

  • In case anyone is interested, here are a couple of websites for Outlook developers:

    http://www.OutlookCode.com

    http://www.Slipstick.com

  • I saw this artice, and am trying to figure out how to go in reverse.

    I have a simple SQL server database table, and I want to update the outlook contact list with some contact info that is in the SQL table.

    Is there an easy way to do this. I have seen genius connect, but what I am doing is only copying contacts over, not all of hte other outlook components, so 700.00 for 5 people to copy from sql server to outlook seems a little extreme..

    thanks

    tim

  •  
    It is an Outlook Add-on for sync with SQL Server and other ODBC databases.

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic. Login to reply