How to write an asp script storing the result from a query in a CSV text file ? 
Author Message
 How to write an asp script storing the result from a query in a CSV text file ?

How to write an asp script storing the result from a query in a CSV text
file ?

Hello,

Generally the resutls from a query are sent to an HTML page
I would like to store them into a text file with the CVS format (; or ,)
The problem lies in the way to format the data.
Can somebody help me ?

Regards.

Jean-Marc PHILIP



Mon, 15 Sep 2003 03:58:34 GMT  
 How to write an asp script storing the result from a query in a CSV text file ?
CSV format is pretty simple

-- Separate values with commas.

value1,value2,value3

-- If the value contains one or more commas, enclose the value in quotes.

"value ""1""",value2,value3

-- If the value contains one or more quotes, enclose the value in quotes and double the quotes in
the value.

"value,1",value2,value3

-- Terminate each "record" with a CR+LF pair.

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--


Quote:
> How to write an asp script storing the result from a query in a CSV text
> file ?

> Hello,

> Generally the resutls from a query are sent to an HTML page
> I would like to store them into a text file with the CVS format (; or ,)
> The problem lies in the way to format the data.
> Can somebody help me ?

> Regards.

> Jean-Marc PHILIP



Mon, 15 Sep 2003 09:34:41 GMT  
 How to write an asp script storing the result from a query in a CSV text file ?
Hmmm, I seem to have inverted the embedded comma and quote examples ;-)...  But you get the idea.

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> CSV format is pretty simple

> -- Separate values with commas.

> value1,value2,value3

> -- If the value contains one or more commas, enclose the value in quotes.

> "value ""1""",value2,value3

> -- If the value contains one or more quotes, enclose the value in quotes and double the quotes in
> the value.

> "value,1",value2,value3

> -- Terminate each "record" with a CR+LF pair.

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --

> Please do not email questions - post them to the newsgroup instead.
> --



> > How to write an asp script storing the result from a query in a CSV text
> > file ?

> > Hello,

> > Generally the resutls from a query are sent to an HTML page
> > I would like to store them into a text file with the CVS format (; or ,)
> > The problem lies in the way to format the data.
> > Can somebody help me ?

> > Regards.

> > Jean-Marc PHILIP



Mon, 15 Sep 2003 10:28:03 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to write an asp script storing the result from a query in a CSV text

2. How to write an asp script storing the result from a query in a CSV text

3. Script to parse Outlook survey results to a .CSV file

4. Building data entry screens in vbscript and writing results to text files

5. Writing query result set to ascii file

6. Write results of recordset to text file

7. Export query results to text file

8. Sending HTML Form results to a CSV file

9. Writing vbs script results to a file

10. Writing vbs script results to a file

11. Outputting ASP results into a text file.

12. store in text file via ASP

 

 
Powered by phpBB® Forum Software