heyday2004
asked on
SQL statements are ready, how to embed them in an executible file? do i need to use ado.net?
My task is:
1. build SQL statements to stored the result in a .csv file to my sql server table:
BULK INSERT mytable
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.
1. build SQL statements to stored the result in a .csv file to my sql server table:
BULK INSERT mytable
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.
http://www.dotnet247.com/247reference/msgs/30/154097.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.