I am working on the functionality of mail merge on winform using C#. As its known it in mail merge an email is sent to the batch. To serve this purpose the data list is created and its stored in database, when user pressess the “Insert and merge” option the data is retrieved from DB and replaces the place holders.
The query used is;
comm.CommandText=”select <> from <> where Sno=1;
where Sno is primary key
The question is, How can I do it dynamically
int rec=1;
I want to replace “1” with this variable, how can I do it?
1 Answer