473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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


Dec 14 '06 #1
5 3340
verify account it is running under has permissions to perform this
operation.
"mike" <be*****@hotmail.comwrote in message
news:On**************@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


Dec 14 '06 #2
Hi,

running in SQL QA as sysadmin

"vbnetdev" <ad***@kjmsolutions.comwrote in message
news:Ov**************@TK2MSFTNGP06.phx.gbl...
verify account it is running under has permissions to perform this
operation.
"mike" <be*****@hotmail.comwrote in message
news:On**************@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



Dec 14 '06 #3
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
Dec 14 '06 #4


"mike" <be*****@hotmail.comwrote in message
news:#6**************@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

Dec 14 '06 #5
"mike" <be*****@hotmail.comwrote in
news:On**************@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
Dec 14 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dharmesh Gandhi | last post by:
DB-Library Error 10007: General SQL Server error: Check messages from the SQL Server. CREATE PROCEDURE . ( @srvr varchar(50),
1
by: Jagannathan Santhanam | last post by:
Hello I am trying to execute ‘xp_cmdshell' from within a DTS package that was created by another person. When I try to execute that ‘SQL Task' selectively from within the package, I get the...
1
by: Matt | last post by:
HI I am using the following code in an SP, it seems like an ugly hack I have done to check if the BCP was working or not, I check the table it shold have filled instead of checking the error...
1
by: Miles B | last post by:
Does anyone know how to run a DTS package through a normal MS Access? I've got some code from the web and it doesn't seem to work - perhaps it is because I'm connecting to an instance on a...
2
by: aaj | last post by:
Hi all I have a stored procedure that has the line EXEC master..xp_cmdshell 'dtsrun /Stestjob1 /N testdts /E' If I run the SP from an access front end as a trusted user or from a scheduled...
4
by: Chris Allison | last post by:
I am getting the following error when running a command in Query Analyzer. Msg 50001, Level 1, State 50001 xpsql.cpp: Error 5 from CreateProcess on line 675 Here is the command that I am...
0
by: simon | last post by:
I have dataGrid on my page with edit button. When user click edit button and change some value and after that click update button, the following code is executed: oCmd = New...
2
by: ssshhh | last post by:
hi! I'm usng SQL server and i want to rename a file using the xp_cmdshell. here's my code: declare @path varchar (20) declare @filename varchar (20) declare @new varchar (20) declare @cmd...
1
by: Tina888 | last post by:
I am running osql command that goes and grabs files from my folder and runs one script at a time and loops though all the files in that folder. Most of the files and simple inserts or creation of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.