小编Eri*_*ess的帖子

评论try catch语句

在try-catch语句中解释错误处理的适当位置是什么?看起来您可以将解释性注释放在try块的开头或catch块中.

// Possible comment location 1
try
{   
    // real code
}
// Possible comment location 2
catch
{
    // Possible comment location 3

    // Error handling code

}
Run Code Online (Sandbox Code Playgroud)

c# error-handling comments

4
推荐指数
3
解决办法
1275
查看次数

如何使用SSIS包将表数据拆分为单独的命名Excel文件?

我正在使用SQL Server中的一组数据,我想将其放入一组Excel文件中.此任务需要自动运行以按月运行.数据看起来像

Site    ID      FirstName   LastName
------  ------- ---------   ---------
North   111     Jim         Smith
North   112     Tim         Johnson
North   113     Sachin      Tedulkar
South   201     Horatio     Alger
South   205     Jimi        Hendrix
South   215     Bugs        Bunny
Run Code Online (Sandbox Code Playgroud)

我希望结果看起来像

In Excel file named North.xls

ID      FirstName   LastName
111     Jim         Smith
112     Tim         Johnson
113     Sachin      Tedulkar

In Excel file named South.xls

ID      FirstName   LastName
201     Horatio     Alger
205     Jimi        Hendrix
215     Bugs        Bunny
Run Code Online (Sandbox Code Playgroud)

"网站"列中有70到100个值,我想拆分.我正在使用SSIS来执行此任务,但是在使用OLE DB Source任务从SQL Server中提取数据后,我陷入困境.接下来会发生什么?如果有一种更简单的方法可以使用其他工具来实现这一点,我也会对此持开放态度.

sql-server excel ssis

2
推荐指数
1
解决办法
1万
查看次数

SSRS电子邮件订阅配置

我试图配置Sql Server Reporting Services 2008以在创建订阅时发送电子邮件.我在Native模式下运行SSRS.每当我尝试创建新的电子邮件订阅时,此错误消息都会显示在日志文件中:

library!ReportServer_0-3!14e4!01/30/2009-12:58:52:: Call to GetSystemPermissionsAction().
library!ReportServer_0-3!1684!01/30/2009-12:58:52:: Call to GetPermissionsAction(/Report Folder/Report Name).
library!ReportServer_0-3!14e4!01/30/2009-12:58:52:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedNativeModeException: This operation is not supported on a report server that runs in native mode., ;
 Info: Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedNativeModeException: This operation is not supported on a report server that runs in native mode.
extensionfactory!ReportServer_0-3!14e4!01/30/2009-12:58:52:: e ERROR: Exception caught instantiating Report Server DocumentLibrary report server extension: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for …
Run Code Online (Sandbox Code Playgroud)

sql-server reporting-services

2
推荐指数
1
解决办法
1万
查看次数

通过.NET关闭时Excel 2007挂起

我有一个Visual Basic .NET程序,需要打开和关闭Excel电子表格.打开和阅读电子表格工作正常,但尝试关闭Excel 2007应用程序会导致它挂起.它似乎关闭,但如果你查看任务管理器,应用程序仍在运行.我用来关闭它的代码是

wbkData.Close(saveChanges:=False)
appExcel.Quit()
wbkData = Nothing
appExcel = Nothing
Run Code Online (Sandbox Code Playgroud)

如何让Excel正常关闭?

.net vb.net excel

1
推荐指数
1
解决办法
2469
查看次数