473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Managed Code / Shell

am working on a project now for a client that requires all managed code.
I have rewritten about 60% of the code and functionality in C# and have
now come to the complicated part of picking apart the existing stored
procedure and "managing" it. Two tasks that I am outing from the stored
procedure are as follows:

1) execution of a .vbs that creates a .txt file (CSV) of user
information
2) loading of said text file into an .exe and executing

I can achieve the same result as 1 with a streamwriter. This shouldn't
be too complicated. Number 2 is what I am worried about. The .exe will
reside on the same server where my application exists. What would be
the best way to accomplish this task in a managed way?

I tried opening the exe on the server by double-clicking it and got the
following error:

"%E: Cannot find "\Ent=' parameter on the command line."

So there is no GUI. It seems as if this is a simple console application.

Here is the line from the old stored procedure:

SET @LaunchImportString = '\\' + @AppServer +
'\applicationName\sys_exe\ga_imp2.exe /GO /Ent=' + cast(@EntID as
varchar(20)) + ' /Store=1'
exec master..xp_cmdshell @LaunchImportString, no_output
Thanks in advance,

- Will
*** Sent via Developersdex http://www.developersdex.com ***
Jun 17 '06 #1
2 1922
Will,

Funny finding you here.... One thing that you might look at is using SQL
CLR. It is definately "managed" and might allow you to write out your text
file from within SQL. Another option would be to call the new Windows
command shell aka Monad. Not sure on that and it is still in beta but it
might provide a managed environment I think?

Jennifer is still feeling pretty good so we might just join you for the BBQ.
What can we bring?

--
Andrew Robinson
http://blog.binaryocean.com
"Will Asrari" <wi*********@devdex.com> wrote in message
news:OZ**************@TK2MSFTNGP04.phx.gbl...
am working on a project now for a client that requires all managed code.
I have rewritten about 60% of the code and functionality in C# and have
now come to the complicated part of picking apart the existing stored
procedure and "managing" it. Two tasks that I am outing from the stored
procedure are as follows:

1) execution of a .vbs that creates a .txt file (CSV) of user
information
2) loading of said text file into an .exe and executing

I can achieve the same result as 1 with a streamwriter. This shouldn't
be too complicated. Number 2 is what I am worried about. The .exe will
reside on the same server where my application exists. What would be
the best way to accomplish this task in a managed way?

I tried opening the exe on the server by double-clicking it and got the
following error:

"%E: Cannot find "\Ent=' parameter on the command line."

So there is no GUI. It seems as if this is a simple console application.

Here is the line from the old stored procedure:

SET @LaunchImportString = '\\' + @AppServer +
'\applicationName\sys_exe\ga_imp2.exe /GO /Ent=' + cast(@EntID as
varchar(20)) + ' /Store=1'
exec master..xp_cmdshell @LaunchImportString, no_output
Thanks in advance,

- Will
*** Sent via Developersdex http://www.developersdex.com ***

Jun 17 '06 #2
PS: I realize that the BBQ is next weekend....

--
Andrew Robinson
http://blog.binaryocean.com
"Will Asrari" <wi*********@devdex.com> wrote in message
news:OZ**************@TK2MSFTNGP04.phx.gbl...
am working on a project now for a client that requires all managed code.
I have rewritten about 60% of the code and functionality in C# and have
now come to the complicated part of picking apart the existing stored
procedure and "managing" it. Two tasks that I am outing from the stored
procedure are as follows:

1) execution of a .vbs that creates a .txt file (CSV) of user
information
2) loading of said text file into an .exe and executing

I can achieve the same result as 1 with a streamwriter. This shouldn't
be too complicated. Number 2 is what I am worried about. The .exe will
reside on the same server where my application exists. What would be
the best way to accomplish this task in a managed way?

I tried opening the exe on the server by double-clicking it and got the
following error:

"%E: Cannot find "\Ent=' parameter on the command line."

So there is no GUI. It seems as if this is a simple console application.

Here is the line from the old stored procedure:

SET @LaunchImportString = '\\' + @AppServer +
'\applicationName\sys_exe\ga_imp2.exe /GO /Ent=' + cast(@EntID as
varchar(20)) + ' /Store=1'
exec master..xp_cmdshell @LaunchImportString, no_output
Thanks in advance,

- Will
*** Sent via Developersdex http://www.developersdex.com ***

Jun 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Falk | last post by:
Is it possible to use / integrate a C++ DLL from C# code like it is possible with JNI at Java? Is there any technology like that?
4
by: Tommy Vercetti | last post by:
I've been trying to convert a Standard C++/MFC application to Managed C++/Forms (the application is pretty complex but the GUI is just a simple status dialog). I created a new project shell and...
2
by: YeJianWei | last post by:
I need to wrap a MFC extension Dll with export class(let's suppose it's named CA) so we could use it in C#. The dll is provided by third party vendor which means I couldn't modify it. A...
13
by: bonk | last post by:
Hello, I am trying to create a dll that internally uses managed types but exposes a plain unmanaged interface. All the managed stuff shall be "wrapped out of sight". So that I would be able to...
8
by: quortex | last post by:
Hi all, I have a native class which has a single instance controlled via the singleton pattern. I need to call this from both native C++ and from mixed mode visual studio 2005 c++ CLI. At...
5
by: dovgani | last post by:
I have an unmanaged MFC project. The output is static lib. I would like to compile using /clr option. The native lib size is 64 megs and with /clr and /O1 options is 940 megs. Is it possibly...
2
by: noel.phillips | last post by:
Hi, I am porting a C++ console application to managed C++ dll - for now basically wrapping it in a class. The console app has the option to write to a file or stdout using fwrite. So, how do...
0
by: vve | last post by:
I'm discovering a strange behaviour in an C# project using ZedGraph (https://sourceforge.net/projects/zedgraph/). After adding a signal to it, it seems that the clr goes mad for some reason. I...
1
by: Patrick Philippot | last post by:
Hi, According to this discussion: http://forums.msdn.microsoft.com/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/ it is very unsafe to write shell extensions in managed code...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.