We help IT Professionals succeed at work.

ASP -> CSV Export Recordset Alternate Options

geoenvi asked
Medium Priority
Last Modified: 2012-08-13
Hello All

Is there an alternate (better) way to create a CSV file from a recordset  other than:

1. Using Filesystem Object (Don't like because of security issues)
2. Setting content type and asking the users to download a text file from the client browser (don't like because I need to name the text files uniquely and send it to a remote FTP server downstream)
3. Using OSQL or ISQL from SQL Server (tried it but the CSV format seems jumbled)

Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)


Can you pass  parameters this way?  I used OSQL instead of bcp to export to CSV but the format is not what youy expect.  I postes that particular problem in the DB/SQL area.

You can pass parameters into Stored procedure. & Change the @bcpCommand  string to match.


Yeah tried that too.. Same problem as osql.  the csv format appears jumbled.  Does not work
Either its a problem with Settings or data problem. BCP may give problem if special characters are present. Try exporting a simple table with simple fields as a test.
Try to export manualy through DTS then you will know if your sql server settings are OK.

What security issues in reagrds to FileSystemObject are you concerned about?
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.