Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 textcopy

Author  Topic 

Rupa
Posting Yak Master

123 Posts

Posted - 2007-06-11 : 06:35:37
Hey all
I'm tried to execute the following stored procedure:

[dbo].[sp_textcopy] (
@dbname varchar (30),
@tbname varchar (30),
@colname varchar (30),
@filename varchar (30),
@whereclause varchar (40),
@direction char(1))
AS
DECLARE @exec_str varchar (255)
SELECT @exec_str =

'textcopy /D ' + @dbname +
' /T ' + @tbname +
' /C ' + @colname +
'" /F ' + @filename +
' /W "' + @whereclause +
' /' + @direction

EXEC master..xp_cmdshell 'dir "c:\Program Files\Microsoft SQL Server\MSSQL\Binn\textcopy.exe"'

and have entered the following parameters:

'dbname,
'tbl_image',
'picture',
'C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\12.jpg',
'id = 12"',
'I'

But I get the following messages:

Volume in drive C has no label.
Volume Serial Number is 90D5-A193
NULL
Directory of c:\Program Files\Microsoft SQL Server\MSSQL\Binn
NULL
06/08/2000 01:50 294,973 textcopy.exe
1 File(s) 294,973 bytes
0 Dir(s) 55,265,722,368 bytes free
NULL

Return Value
0

I would like to know where I've gone wrong here???

Any help will be highly appreciated.

Many thanks

Rupa

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-11 : 06:45:31
Please do not cross-post: [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=84802[/url]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Rupa
Posting Yak Master

123 Posts

Posted - 2007-06-11 : 07:07:21
This is for SQL Server 2005 which brings different messages and the other one is for SQL Server 2000.

Apologies for that..

Rupa
Go to Top of Page
   

- Advertisement -