How to store the document with the name having the value taken by Database,
For storing the document with the name having the value taken by Database, you need to access the values from the database and fill it in a DataTable. From the DataTable we can access the row values using the below code:
C#
foreach (DataRow row in table.Rows)
{
MessageBox.Show(row[0].ToString());
document.Save(row[0] + ".doc", FormatType.Doc);
}