[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


SQL statements are ready, how to embed them in an executible file? do i need to use ado.net?

Posted on 2005-04-10
Medium Priority
Last Modified: 2010-04-16
My task is:
1. build SQL statements to stored the result in a .csv file to my sql server table:

FROM 'f:\orders\lineitem.tbl'

2. move some files to other table

3. get a .exe (executable) file to be used in other program (windows service, etc), i.e. when user execute the .exe file, the step 1 and step 2 will be done.

I've finished step1 in SQL server 2000, also i can program the move file operation in C#, and now how to get a .exe file to combine above specifications in the easiest way? Some kind of embedded SQL statement? Do i still need to use ADO.NET to open a connection to database, etc? Thanks for any suggestions.
Question by:heyday2004
  • 3
LVL 14

Accepted Solution

Thandava Vallepalli earned 1050 total points
ID: 13750612

Author Comment

ID: 13751095
Thanks a lot. It's very good, but i'm still not sure about which way is better so that user can have a .exe and most important, embed SQL statements in the C# programs. Thanks again for the good suggestions.

Assisted Solution

rajaloysious earned 450 total points
ID: 13751173
It it always better to have them pre compiled as stored procedures in the database as this is obviously faster and easy to maintain
instead of embedding sql in the front end code.

You can call the stored procedure with appropriate areguments from the exe.


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question