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

Posted on 2005-04-10
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
    LVL 14

    Expert Comment

    by:Thandava Vallepalli
    LVL 14

    Expert Comment

    by:Thandava Vallepalli
    LVL 14

    Accepted Solution


    Author Comment

    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.
    LVL 8

    Assisted Solution

    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

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    This video discusses moving either the default database or any database to a new volume.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now