大家好 我创建了一个C#控制台应用程序,使用xp_cmdshell通过 存储过程调用。该应用程序从数据库生成一个Excel 报告,其中嵌入了一个宏。通过xp_cmdshell报告 生成失败。 但是当我尝试从命令提示符运行可执行文件时生成 报告成功使用宏。什么可能是这里的 问题? 提前谢谢 Senthil
Hi all I created a C# console application that is called through a stored procedure using xp_cmdshell. The application generates an Excel report from the database with a macro embedded in it. The report generation fails when it is through xp_cmdshell. But when I tried to run the executable from the command prompt the report gets generated successfully with the macro. What could be the problem here?? Thanks in advance Senthil
推荐答案2007年1月15日05:33:02 -0800,Senthil写道: On 15 Jan 2007 05:33:02 -0800, Senthil wrote: 大家好/> 我创建了一个C#控制台应用程序,它使用xp_cmdshell通过 存储过程调用。该应用程序从数据库生成一个Excel 报告,其中嵌入了一个宏。通过xp_cmdshell报告 生成失败。 但是当我尝试从命令提示符运行可执行文件时生成 报告成功使用宏。什么可能是这里的 问题? 提前致谢 Senthil Hi all I created a C# console application that is called through a stored procedure using xp_cmdshell. The application generates an Excel report from the database with a macro embedded in it. The report generation fails when it is through xp_cmdshell. But when I tried to run the executable from the command prompt the report gets generated successfully with the macro. What could be the problem here?? Thanks in advance Senthil
可能用于运行xp_cmdshell帐户的sql server帐户 无权运行此类系统存储过程。您将需要 来授予该帐户相应的权利 - Bits.Bytes bytes.thinkersroom
Rad, 你会不会回答VB.Net新闻组中的C#问题。 我从未见过由MVP完成,至少没有告诉我有更好的新闻组。 提前谢谢 Cor " Rad [Visual C#MVP]" < no **** @ nospamschreef在bericht 新闻:11 *************** @fickersroom ... Rad, Will you be so kind not to answer C# questions in the VB.Net newsgroup. I never saw that done by a MVP without telling at least that there was a better newsgroup for that. Thanks in advance Cor "Rad [Visual C# MVP]" <no****@nospamschreef in bericht news:11***************@thinkersroom... 2007年1月15日05:33:02 -0800,Senthil写道: On 15 Jan 2007 05:33:02 -0800, Senthil wrote: >大家好我创建了一个C#控制台应用程序,使用xp_cmdshell通过存储过程调用。应用程序从数据库中生成一个Excel 报告,其中嵌入了一个宏。通过xp_cmdshell报告生成失败。但是当我尝试从命令提示符运行可执行文件时,使用宏成功生成了报告。这可能是什么问题? 提前致谢 Senthil >Hi all I created a C# console application that is called through astored procedure using xp_cmdshell. The application generates an Excelreport from the database with a macro embedded in it. The reportgeneration fails when it is through xp_cmdshell.But when I tried to run the executable from the command prompt thereport gets generated successfully with the macro. What could be theproblem here??Thanks in advanceSenthil
可能是sql server帐户那个您用来运行xp_cmdshell 帐户 无权运行此类系统存储过程。您将需要 来授予该帐户相应的权利 - Bits.Bytes bytes.thinkersroom
" Cor Ligthert [MVP]" < no ************ @ planet.nlwrote in message news:eY ************** @ TK2MSFTNGP04.phx .gbl ... "Cor Ligthert [MVP]" <no************@planet.nlwrote in message news:eY**************@TK2MSFTNGP04.phx.gbl... Rad, 你会不会回答VB.Net中的C#问题 新闻组。 我从来没有看到MVP完成的事情,至少没有告诉那个有更好的新闻组。 提前致谢 Cor " Rad [Visual C#MVP]" < no **** @ nospamschreef在bericht 新闻:11 *************** @fickersroom ... Rad, Will you be so kind not to answer C# questions in the VB.Net newsgroup. I never saw that done by a MVP without telling at least that there was a better newsgroup for that. Thanks in advance Cor "Rad [Visual C# MVP]" <no****@nospamschreef in bericht news:11***************@thinkersroom... > 2007年1月15日05:33:02 -0800,Senthil写道: >On 15 Jan 2007 05:33:02 -0800, Senthil wrote: >> Hi所有我创建了一个C#控制台应用程序,使用xp_cmdshell通过存储过程调用。该应用程序从数据库中生成一个包含宏的宏报告。通过xp_cmdshell报告生成失败。但是当我尝试从命令提示符运行可执行文件时,使用宏成功生成了报告。这可能是什么问题? 提前致谢 Senthil >>Hi all I created a C# console application that is called through astored procedure using xp_cmdshell. The application generates anExcelreport from the database with a macro embedded in it. The reportgeneration fails when it is through xp_cmdshell.But when I tried to run the executable from the command prompt thereport gets generated successfully with the macro. What could be theproblem here??Thanks in advanceSenthil
可能是您用来运行的sql server帐户xp_cmdshell 帐户无权运行此类系统存储过程。您将需要授予帐户相应的权利 - Bits.Bytes bytes.thinkersroom
更多推荐
控制台应用程序生成Excel文件
发布评论