Click here to Skip to main content
15,860,972 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Actually I have a problem exporting a database. I want to export a database entry with its corresponding document which is in the .rtf format. I was using the following code to export the document in the .rtf format:
C#
private void export()
{
  if (saveFileDialog1.ShowDialog() == DialogResult.OK)
  {
    try
    {
      saveFileDialog1.Filter = "RTF Files|*.rtf";
      richTextBoxProcedure.SaveFile(saveFileDialog1.FileName,
        RichTextBoxStreamType.RichText);
    }
    catch (Exception ex)
    {
      MessageBox.Show(ex.Message);
    }
  }
}

What can I do in order to export a particular database entry from the database?
Posted
Updated 20-Mar-14 12:49pm
v3
Comments
ZurdoDev 20-Mar-14 14:33pm    
To csv? Just write your values out with commas in between. Where are you stuck?

1 solution

A .CSV file is nothing but a text file. It's the easiest kind of file to write!

CSV is Comma Separated Values. All you have to do is write a comma out between each field you write to the file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900