PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming vb.net app error when running in master..xp_cmdshell

Reply

vb.net app error when running in master..xp_cmdshell

 
Thread Tools Rate Thread
Old 14-12-2006, 12:24 AM   #1
mike
Guest
 
Posts: n/a
Default vb.net app error when running in master..xp_cmdshell


I created a VB.NET app that uses Outlook's COM object.

I get an error when I run master..xp_cmdshell 'myprogram.exe' in SQL query
analyzer.



The error occurs on this line "oOutlook = New Outlook.Application"



Unhandled Exception: System.Runtime.InteropServices.COMException
(0x80080005):



Server execution failed at WindowsApplication3.Main.ProcessInbox(String
FolderName, String WhichFolder, String DateTimePicker1) in C:\Documents and
Settings\user1\My Documents\Visual Studio
Projects\WindowsApplication3\Main.vb:line 80

at WindowsApplication3.Main.main() in C:\Documents and Settings\user1\My
Documents\Visual Studio Projects\WindowsApplication3\Main.vb:line 20




  Reply With Quote
Old 14-12-2006, 01:39 AM   #2
vbnetdev
Guest
 
Posts: n/a
Default Re: vb.net app error when running in master..xp_cmdshell

verify account it is running under has permissions to perform this
operation.


"mike" <bethere@hotmail.com> wrote in message
news:On9oBZxHHHA.1264@TK2MSFTNGP06.phx.gbl...
>I created a VB.NET app that uses Outlook's COM object.
>
> I get an error when I run master..xp_cmdshell 'myprogram.exe' in SQL query
> analyzer.
>
>
>
> The error occurs on this line "oOutlook = New Outlook.Application"
>
>
>
> Unhandled Exception: System.Runtime.InteropServices.COMException
> (0x80080005):
>
>
>
> Server execution failed at WindowsApplication3.Main.ProcessInbox(String
> FolderName, String WhichFolder, String DateTimePicker1) in C:\Documents
> and Settings\user1\My Documents\Visual Studio
> Projects\WindowsApplication3\Main.vb:line 80
>
> at WindowsApplication3.Main.main() in C:\Documents and Settings\user1\My
> Documents\Visual Studio Projects\WindowsApplication3\Main.vb:line 20
>
>
>
>



  Reply With Quote
Old 14-12-2006, 01:56 AM   #3
mike
Guest
 
Posts: n/a
Default Re: vb.net app error when running in master..xp_cmdshell

Hi,

running in SQL QA as sysadmin

"vbnetdev" <admin@kjmsolutions.com> wrote in message
news:OvdTzCyHHHA.1008@TK2MSFTNGP06.phx.gbl...
> verify account it is running under has permissions to perform this
> operation.
>
>
> "mike" <bethere@hotmail.com> wrote in message
> news:On9oBZxHHHA.1264@TK2MSFTNGP06.phx.gbl...
>>I created a VB.NET app that uses Outlook's COM object.
>>
>> I get an error when I run master..xp_cmdshell 'myprogram.exe' in SQL
>> query analyzer.
>>
>>
>>
>> The error occurs on this line "oOutlook = New Outlook.Application"
>>
>>
>>
>> Unhandled Exception: System.Runtime.InteropServices.COMException
>> (0x80080005):
>>
>>
>>
>> Server execution failed at WindowsApplication3.Main.ProcessInbox(String
>> FolderName, String WhichFolder, String DateTimePicker1) in C:\Documents
>> and Settings\user1\My Documents\Visual Studio
>> Projects\WindowsApplication3\Main.vb:line 80
>>
>> at WindowsApplication3.Main.main() in C:\Documents and Settings\user1\My
>> Documents\Visual Studio Projects\WindowsApplication3\Main.vb:line 20
>>
>>
>>
>>

>
>



  Reply With Quote
Old 14-12-2006, 02:32 AM   #4
aaron.kempf@gmail.com
Guest
 
Posts: n/a
Default Re: vb.net app error when running in master..xp_cmdshell

WTF are you trying to do?

send mail? make an appointment?

using the outlook object model is just ridiculous I think

-Aaron


mike wrote:
> I created a VB.NET app that uses Outlook's COM object.
>
> I get an error when I run master..xp_cmdshell 'myprogram.exe' in SQL query
> analyzer.
>
>
>
> The error occurs on this line "oOutlook = New Outlook.Application"
>
>
>
> Unhandled Exception: System.Runtime.InteropServices.COMException
> (0x80080005):
>
>
>
> Server execution failed at WindowsApplication3.Main.ProcessInbox(String
> FolderName, String WhichFolder, String DateTimePicker1) in C:\Documents and
> Settings\user1\My Documents\Visual Studio
> Projects\WindowsApplication3\Main.vb:line 80
>
> at WindowsApplication3.Main.main() in C:\Documents and Settings\user1\My
> Documents\Visual Studio Projects\WindowsApplication3\Main.vb:line 20


  Reply With Quote
Old 14-12-2006, 03:53 AM   #5
David Browne
Guest
 
Posts: n/a
Default Re: vb.net app error when running in master..xp_cmdshell



"mike" <bethere@hotmail.com> wrote in message
news:#67tZMyHHHA.4760@TK2MSFTNGP03.phx.gbl...
> Hi,
>
> running in SQL QA as sysadmin
>


sysadmin is a SQL Server Server Role. xp_cmdshell spawns processes using
the windows identity of the service account. That's the relevant security
principal to check.

David

  Reply With Quote
Old 14-12-2006, 07:00 PM   #6
Dan Mitchell
Guest
 
Posts: n/a
Default Re: vb.net app error when running in master..xp_cmdshell

"mike" <bethere@hotmail.com> wrote in
news:On9oBZxHHHA.1264@TK2MSFTNGP06.phx.gbl:
> I created a VB.NET app that uses Outlook's COM object.
>
> I get an error when I run master..xp_cmdshell 'myprogram.exe' in SQL
> query analyzer.


I don't know enough about SQL server to be sure here, but is this trying
to run Outlook from the SQL server process itself? If so, then you
probably can't do it:

http://support.microsoft.com/kb/237913/en-us

-- dan
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off