Exporting from a SQL database to a .TXT file

Discussion in 'Databases' started by Bruce, Apr 7, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    so you want to log the information when a user submit a form to a text file as well as SQL

    or

    you want to just save it to SQL and periodically export the database back out to a log file.

    You would do totally different things in each scenario.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  2. I am fairly new to programming and am looking for advice. I am creating a website that writes information (collected from textboxes) to a SQL database when the viewer clicks a submit button. What I ultimately need is for that information to be exported to a .TXT file during that same process, after it has been sent to the SQL database. I need to know the best way to do that.

    Is there a way to create the .TXT file without using the SQL database? Or, do I need to export that information from the SQL database? If I need to use the SQL database, what is the best way to make this happen using ASP.NET coding on the website? (I am programming in VB.NET). I have read a little bit about BCP and DTS, and am really more confused than ever....

    Any help, advice, and/or direction would be appreciated!

    Thanks!
     
  3. Thanks for responding!

    Basically, I'd like your first scenario to happen. I want each instance of the informationto write to a SQL database AND be written to a .TXT file when the submit button is clicked.

    The filename for the .TXT file would preferably be unique to each user, also. If Joe Smith enters his information, (name, address, etc.), when he clicks submit:

    -each textbox field writes to a corresponding SQL database field (which I understand how to do)
    - a .TXT file is created with each textbox field separated by a comma
    (i.e., Joe,Smith,123 Main St)
    - the .TXT file is named Smith.TXT, for example

    What's the best way to make this happen?
     
  4. Bruce

    Bruce DiscountASP.NET Staff

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page