Hi, I'm new to c#/win forms and Please help me to solve my problem. Say I have a DataBase Table (Peron) with three fields in it. Name nvarchar(20), Age int, RollNo int Table would be something like this Name Age RollNo Andy 10 1 Scott 30 2 Smith 25 3 I fire a query (select * from Person) to this table to get back all the rows. Now when I get the result back I want to create a text file which would hold information like that. As we see there are three records in the table and I would like to create those three records in the text file(if there are hundred records in the table then I would like to create hundred lines in the text file) like this.. // Text file should look like this Insert into Person(Name, Age, RollNo) Values('Andy',10,1) Insert into Person(Name, Age, RollNo) Values('Scott',30,2) Insert into Person(Name, Age, RollNo) Values('Smith',25,3) // end of text file Idea is basically to create Insert statement for all the Records . Please advise.. |