You are here: Re: Creating Text File from Stored Procedure « MsSQL Server « IT news, forums, messages
Re: Creating Text File from Stored Procedure

Posted by John Bell on 09/09/05 11:16

Hi

Enquote the filename with double quotes should have worked, therefore the
file may not exist or could be still open. If "\\servername\d$\The
File\sub\filename.dat" from a command prompt says the file does not exist
then it probably doesn't or permissions are wrong.

If this is a batch file you may want to use a more appropriate extension.

John

"phantom" <phantomtoe@yahoo.com> wrote in message
news:1126224325.956647.140030@g43g2000cwa.googlegroups.com...
> Greetings,
>
> I have a sp that dumps text into a textfile but I am having trouble
> creating the textfile.
>
> EXEC master.dbo.xp_cmdShell '\\servername\d$\The File\sub\filename.dat'
>
> The directory "The File" has a space in it. I've tried putting the
> carat ^ before the space, and putting double quotes...but I keep
> getting this error
>
> '\\servername\d$\The' is not recognized as an internal or external
> command, operable program or batch file.
>
> If I do EXEC master.dbo.xp_cmdShell '"\\servername\d$\The
> File\sub\filename.dat"' I get the same thing.
>
> If I do EXEC master.dbo.xp_cmdShell '""\\servername\d$\The
> File\sub\filename.dat""' I get
>
> '"\\servername\d$\The File\sub\filename.dat"'
> is not recognized as an internal or external command, operable program
> or batch file.
>
> Does anybody see what I am doing wrong?
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация