用于检查文件脚本问题的 SSIS 脚本任务
SSIS Script Task to Check for File Script Issue
我在这里看到了另一个 post,版主删除了我在旧 post 上回答的问题,所以我又来了一个新问题..
Anoop 的回答,效果很好,returns 布尔值,这是我想对 return 做一个总统约束,然后表达发送邮件或继续包裹,但我复制了代码和它在这条线上说:
Dts.Variables["User::fileExists"].Value = File.Exists(fullPath);
File.Exists 旁边的单词 "File"(fullPath);带有红色下划线并表示 "The name File does not exist in the current context."
我需要在代码上方定义它吗?那是什么代码?
将此添加到脚本的顶部。具体来说,在默认情况下可能折叠的命名空间声明部分。
using System.IO;
MSDN
https://msdn.microsoft.com/en-us/library/system.io.file(v=vs.100).aspx
文件是位于 System.IO 中的静态 class。在 .cs 文件的顶部添加一个 "using System.IO;"。
我在这里看到了另一个 post,版主删除了我在旧 post 上回答的问题,所以我又来了一个新问题..
Anoop 的回答,效果很好,returns 布尔值,这是我想对 return 做一个总统约束,然后表达发送邮件或继续包裹,但我复制了代码和它在这条线上说:
Dts.Variables["User::fileExists"].Value = File.Exists(fullPath);
File.Exists 旁边的单词 "File"(fullPath);带有红色下划线并表示 "The name File does not exist in the current context."
我需要在代码上方定义它吗?那是什么代码?
将此添加到脚本的顶部。具体来说,在默认情况下可能折叠的命名空间声明部分。
using System.IO;
MSDN https://msdn.microsoft.com/en-us/library/system.io.file(v=vs.100).aspx
文件是位于 System.IO 中的静态 class。在 .cs 文件的顶部添加一个 "using System.IO;"。