?
Solved

Using ActiveX from TSQL script

Posted on 2000-04-12
4
Medium Priority
?
463 Views
Last Modified: 2013-11-18
Hello all,

I want to process email messages from scheduled Transact SQL script. I tried to use xp_sendmail /xp_readmail standard routines, and they seem to be working (sometimes :).

The problem is that I need to access at least to header information of the message, and save it to file. xp_readmail doesn't support that.

I found several ActiveX controls that have this functionality, but I don't know the best way to access to ActiveX from TSQL script, and haven't found any information in docs. So I see next ways:

1. using 3rd party xp_... routines. I haven't found any, except http://www.spudsoft.demon.co.uk/code/index.html but it is for sending (SMTP), and I'd rather prefer to deal with commercial software

2. using xp_cmdshell troutine to external .exe file that extracts data from POP3/IMAP boxes, then import data to DB

3. write external routine (ie windows service) that listens to mailbox itself and writes data to DB via something like OLE DB.

But if I could use ActiveX directly from TSQL, it would be the best. Can anybody suggest anything else ?

PS: I reviewed http://www.mssqlserver.com/faq/sqlmail-woexchange.asp, so refering me to that is not necessary :)

<MIXA />
0
Comment
Question by:mixa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
simonsabin earned 400 total points
ID: 2708001
There are a set of sps that are used for accessing COM objects they are prefixed sp_OA

an exmaple of using these is on
http://support.microsoft.com/support/kb/articles/Q152/8/01.asp?LNG=ENG&SA=ALLKB&FR=0

If you are using interdev, you wil see a number of Sps called dt_... in your database, some of these use the sp_oa sps to access sourcesafe.
0
 
LVL 1

Author Comment

by:mixa
ID: 2708280
Cool! this is just I need.

Please post an answer and I give you the points.

Thanks,
<MIXA />
0
 
LVL 1

Author Comment

by:mixa
ID: 2708351
I've found the button to 'accept comment as the answer' :)
0
 
LVL 7

Expert Comment

by:simonsabin
ID: 2708355
You don't need to do that any more just click on accept comment as answer.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question