Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all I am experiencing serious

Status
Not open for further replies.

Craftor

Programmer
Feb 1, 2001
420
NZ
Hi all

I am experiencing serious problems with xp_cmdshell. I have written a program in VB that launches an email message flow (part of our software - just basically functions like an email message with an XML front end) through CDO. Now the program works fine if I double click on it in Windows Explorer, but the moment I try to launch it as a SQL job, it just hangs. I have left it running for an entire weekend and it did NOTHING so I know it's not just slow ;-)

I have a feeling that it is in the log on to Exchange that it is hanging - this is the code that I used:

objSession.Logon "Release", , False, True

objSession is a MAPI.Session variable and yup there is a Release profile on the PC.

Any help please!!!

Craftor

:cool:
 
I would try setting the [ShowDialog] to True for debugging, it might give you a few clues as to what is happening. Also, when you double click it in Explorer, I presume you are logged into Exchange / Outlook, if so, it is probably using your existing session and this might be why it isn't hanging.
 
Unfortunately, you can't have any user input when something is used with xp_cmdshell (or so I understand) and no I'm not logged on to Outlook when I run it - just an Explorer window is open :-(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top