473,385 Members | 1,693 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,385 software developers and data experts.

asp.net xp_cmdshell

Please help me?

I am writting an upload page in asp.net (using vb.net) for my intranet.
I have got the upload working ok, and I then want to run a stored proc
which will run a dts command using xp_cmdshell.

I have set the permissions correctly so that my SQL account I use has
permission to execute the SPROC and execute the xp_cmdshell.
But my question is what ASP objects should I use to run this stored
procedure??

I deally I want to see the DTS ressults diplayed to the screen, I've
tried using a datareader, but it does not seem to be working

can anyone help?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 1851
post ur code!

"m3ckon" wrote:
Please help me?

I am writting an upload page in asp.net (using vb.net) for my intranet.
I have got the upload working ok, and I then want to run a stored proc
which will run a dts command using xp_cmdshell.

I have set the permissions correctly so that my SQL account I use has
permission to execute the SPROC and execute the xp_cmdshell.
But my question is what ASP objects should I use to run this stored
procedure??

I deally I want to see the DTS ressults diplayed to the screen, I've
tried using a datareader, but it does not seem to be working

can anyone help?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
Hi m3ckon:

As Patrick suggested you should post some code. You'll need to use the
SqlConnection class to establish a conneciton to SQL Server, and the
SqlCommand class to send a command to execute xp_cmdshell (set the
CommandText and CommandType properties).

DTS also provides COM interfaces to interact with if you need a finer
level of control. See:
http://support.microsoft.com/default.aspx?kbid=810581

--
Scott
http://www.OdeToCode.com/

On Thu, 30 Sep 2004 01:23:09 -0700, m3ckon <an*******@devdex.com>
wrote:
Please help me?

I am writting an upload page in asp.net (using vb.net) for my intranet.
I have got the upload working ok, and I then want to run a stored proc
which will run a dts command using xp_cmdshell.

I have set the permissions correctly so that my SQL account I use has
permission to execute the SPROC and execute the xp_cmdshell.
But my question is what ASP objects should I use to run this stored
procedure??

I deally I want to see the DTS ressults diplayed to the screen, I've
tried using a datareader, but it does not seem to be working

can anyone help?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 18 '05 #3

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

Similar topics

3
by: Yvonne | last post by:
Would like to implement Blat on SQL Server 2000. I'm looking for example syntax for setting up BLAT with xp_cmdshell. TIA
3
by: Terri | last post by:
I'm using xp_cmdshell to output a text file from a trigger like this CREATE TRIGGER ON tblApplications FOR INSERT AS DECLARE @FirstName varchar(75) DECLARE @LastName varchar(75) Declare...
4
by: Joel Thornton | last post by:
Whenever something is inserted to a given table, I want to run some shell commands using xp_cmdshell. Would it be a bad idea to put this xp_cmdshell in the INSERT trigger of this table? I...
5
by: Narine | last post by:
Hi Folks, I am using an xp_cmdshell sp to start a C# app. This app downloads data files and imports them into DB. It has a logging functionality built-in and when executed from the command line...
2
by: Lauren Quantrell | last post by:
I have created a view named viewOutput that shows one column in a table. I insert a row into the table and then I'm using this code to create a file with the text in the single row. This code...
1
by: Micah Gentry | last post by:
Is there any way to allow a user to use the xp_cmdshell extended stored procedure without giving that user execute permissions to xp_cmdshell in SQL server 6.5? Let me clarify. Lets say I (as the...
2
by: Maddman | last post by:
Newbie here. In my database I'm needing to automate some data imports. I have the import set up as a DTS package and it works wonderfully. But I'm having trouble kicking it off as a stored...
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...
7
by: Terri | last post by:
I have a stored procedure that creates an xml file. It executes a SELECT statement with the FOR XML clause and then writes the xml file using bcp and xp_cmdshell. I am calling this procedure by...
2
by: darrel | last post by:
I have a simple Stored procedure that I'm using to call the command shell to execut DTSRUN (which, in turn, calls a DTS package): CREATE PROCEDURE updateDB AS Exec master..xp_cmdshell 'DTSRUN...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.