Skip to content
Advertisement

Creating table script with values in codebehind inC#

I want to build a console application with ado.net where I get a table from the database and convert it to a string output in a file. I want to do this with stringbuilder. But before I fetch the data and write it to the string builder I want to fill 2 fields of the table Person “name” and “last name” with “xxx”. End result must be a file with create and insert values statement in tsql.

Is there a smart way to achieve this? Thanks

Advertisement

Answer

I believe something like this is what you’re after:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement