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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bcp utility

Status
Not open for further replies.

dkohli

MIS
Jan 5, 2004
4
US
I am new with ASP. I am trying to copy a table from SQL Server to a text file. I am trying to use the BCP utility of SQL Server.

Can anyone help me out as to what the code will be for running the BCP.

This is what I am doing :
Set runner = CreateObject("WScript.Shell")
Set fs_getfilenames = createobject("Scripting.FileSystemObject")

runner.run "bcp.exe dbname.dbo.Employee out c:\test.txt -m 1 -t, -c -q -S Servername -t " ,1,true

This works from DTS in SQL Server but not from ASP

Any help is appreciated.

Thanks
DK
 
One idea would be to create a stored procedure that would execute this. You could also create a stored procedure to execute the DTS package. With either you could call from an ASP page using your command object or connection.execute.


regards,
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top