Get tab delimited results

N

Niraj Khandwala

hi all,

need to query a database and then get the results in a tab delimited
file. currently am writing record by record in the file using the FSO,
but just wanted to check can we directly get the results in the TAB
delimited format and save to a file on the server.

Thanks & Regards,
Niraj
 
B

Bã§TãRÐ

If you are already writing to a file then you are 1/2 way there. The ASCII version of tab is
so you'd just need to as that or a char(9) to your output.

Hope this helps.

- Bastard
 
B

Bob Barrows [MVP]

Niraj said:
hi all,

need to query a database and then get the results in a tab delimited
file. currently am writing record by record in the file using the FSO,
but just wanted to check can we directly get the results in the TAB
delimited format and save to a file on the server.

It depends on what your database is. This does not sound like a task that
should be done using ASP.

Bob Barrows
 
N

Niraj Khandwala

am using SQL 2000 , also i know how to use the FSO and write the file
but, if the records are toomany it takes time and sometimes the script
also times out.

was lookingat a solution by using something like a Stream Object .... (i
don't really know) to get the entire results from the recordset at once
and then dump to a file (using Stream.Savetofile ....) or something like
that..

__________________
Thanks & Regards,
Niraj
 
B

Bob Barrows [MVP]

Niraj said:
am using SQL 2000 , also i know how to use the FSO and write the file
but, if the records are toomany it takes time and sometimes the script
also times out.

.... which is why ASP is not a good tool for doing this.
was lookingat a solution by using something like a Stream Object ....
(i don't really know) to get the entire results from the recordset at
once and then dump to a file (using Stream.Savetofile ....)

.... same problems as above
or something like that..

Have you investigated using Data Transformation Services (DTS)? It seems to
be tailor-made for what you're doing. You can create a package that does
your export, and schedule it to run periodically, or trigger it to be run
from external programs, such as ASP. There are some pretty good tutorials at
www.sqldts.com.

Bob Barrows
 
N

Niraj Khandwala

hi, Bob
thanks for the direction, will go thru the site and the DTS also

i require files to be generated on the server, in a loop after passing
certain parameters so will check and get back.

actually have never used the DTS, so will get back once i have gone thru
the functionality.
__________________
Thanks & Regards,
Niraj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top