Console application to generate Excel file

S

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
 
R

Rad [Visual C# MVP]

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

Probably the sql server account that you use to run the xp_cmdshell account
does not have the rights to run such system stored procedures. You'll need
to grant the account the appropriate rights
 
C

Cor Ligthert [MVP]

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
 
R

RobinS

Cor Ligthert said:
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
 
R

RobinS

The irony is the answer had nothing to do with either
C# *or* VB. ;-)

Robin S.
-----------------------
 
A

aaron.kempf

ROBIN

how cute

oh did the wuss-ass female programmer finally realize that
microsoft.public.vb is a dead newsgroup so all the vb kids come here?

WHY DO WE USE A NEWSGROUP NAMED DOTNET FOR A LANGUAGE THAT ISNT CALLED
DOTNET?

VB 2005 HAS _NEVER_ BEEN REFERRED TO AS VB DOTNET 2005

and admitting that MS made a mistake-- 5 years ago-- when they changed
the name of the VB newsgroup from microsoft.public.vb to
microsoft.public.dotnet.languages.vb

that is the root of the problem





The irony is the answer had nothing to do with either
C# *or* VB. ;-)

Robin S.
-----------------------
RobinS said:
Cor Ligthert said:
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]" <[email protected]> schreef in bericht
On 15 Jan 2007 05:33:02 -0800, Senthil wrote:

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

Probably the sql server account that you use to run the xp_cmdshell
account
does not have the rights to run such system stored procedures.
You'll need
to grant the account the appropriate rights
 
R

Rad [Visual C# MVP]

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

Well, Cor, as far as I can tell the question and answer have nothing to do
with C# so I didn't think twice about it.
 
R

RobinS

There you go, making assumptions about my gender again.
Tsk tsk tsk.

Have a nice day.
Robin S.
-------------------------
ROBIN

how cute

oh did the wuss-ass female programmer finally realize that
microsoft.public.vb is a dead newsgroup so all the vb kids come here?

WHY DO WE USE A NEWSGROUP NAMED DOTNET FOR A LANGUAGE THAT ISNT CALLED
DOTNET?

VB 2005 HAS _NEVER_ BEEN REFERRED TO AS VB DOTNET 2005

and admitting that MS made a mistake-- 5 years ago-- when they changed
the name of the VB newsgroup from microsoft.public.vb to
microsoft.public.dotnet.languages.vb

that is the root of the problem





The irony is the answer had nothing to do with either
C# *or* VB. ;-)

Robin S.
-----------------------
RobinS said:
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]" <[email protected]> schreef in bericht
On 15 Jan 2007 05:33:02 -0800, Senthil wrote:

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

Probably the sql server account that you use to run the
xp_cmdshell
account
does not have the rights to run such system stored procedures.
You'll need
to grant the account the appropriate rights
 
A

aaron.kempf

i just pick sweetheart; we don't see many female programmers out here

btw; did you go to wsu?
 
R

RobinS

If I were you, I wouldn't assume I was female just because my
name is Robin.

And no, I did not go to wsu.

Robin S.
 
A

aaron.kempf

lol good stuff

just because you're a wuss and you've got no balls; that somehow makes
you 'not a female'?

someone with balls would question dotnet

why are we working for a language that used to be the most popular; but
now it doesn't have a 10% marketshare?

BECAUSE WE WERE CONNED AND ABUSED BY MICROSOFT

and now they ask us to learn a real langauge like C#?

NOT WHEN THEY JUST ****ED US BY KILLING OFF VB FOR NO REASON

why are we in a newsgroup called DOTNET talking about a product that
isn't called DOTNET?
and why is microsoft.public.vb make it look like VB is completely dead?

they never should have renamed the newsgroup from microsoft.public.vb

there is no reason why I can't go to microsoft.public.vb and talk about
Visual ****ing Basic

-Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top