本文介绍了如何使用过程存储打开文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好社区
我正在努力做到以下几点:
1-我做过通过参数输入存储过程,其中一些验证前,最后生成一个txt文件。
2-文本文件是在代码中定义的路径上创建的
该过程成功生成文件。我的问题是如何运行此文件或打开
hello community
I'm trying to do the following:
1- I did a stored process via a parameter input, where some validations ago and finally generates a txt file.
2- text file is created on a path that was defined in the code
The process generates the file successfully. My question is how can I run this file or open
SET @querytext = '"SELECT Descr FROM ##tbl WHERE lote = ' + @Lote + '"'
SET @filelocation = '"C:\Microsoft Dynamics\SL\Applications\LogFacturacion\LOGERROR'+@Batch+'.txt"'
SET @cmd = 'bcp ' + @querytext + ' queryout ' + @filelocation + ' -T -c -d '
EXEC master..XP_CMDSHELL @cmd, NO_OUTPUT
但是我需要打开那个文本文件创建windows explorer
问候
But I need open that text file created windows explorer
Greetings
推荐答案
System.Diagnostics.Process.Start(filelocation);
其中filelocation设置为与上面的@filelocation相同的字符串。
where filelocation is set to the same string as @filelocation above.
这篇关于如何使用过程存储打开文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!