mysql - 如何将Powershell中SQL存储过程返回的消息返回到记事本
问题描述
我必须从 Powershell 运行一个存储过程,并且我能够做到。存储过程不返回任何内容,但会在 Messages 部分打印一些值(请参见下文)
我需要在 powershell 的记事本中输出消息下返回的这个值。下面是我试过但不起作用的代码。请帮忙。
$out1 = $command.ExecuteReader();
$out1.Read()
$out2=$out1[1]
$out2 | Out-File $outFile -Append
解决方案
推荐阅读
- android - Android:编写一个在任何地方使用警报对话框的类
- c++ - 如何使用位域结构和联合制作 4 个字节?
- python - python与sqlite3 db一起工作,从db中保存、更新和检索文本
- c# - 我应该在哪里存储网格数据;在静态变量中,它是自己的类,还是一个类中的所有网格类型?
- regex - 匹配 bash 脚本中的单词模式
- python - Pandas groupby:按学期分组
- sql - 在列中显示选择结果
- sql - 仅当班次位于两个日期时,如何获取班次日期一条记录?
- google-app-engine - `go run *.go` 中的文件如何在没有导入的情况下访问函数?
- javascript - 使用 jQuery 重新加载页面时保留值