473,320 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Get tab delimited results

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
5 2239
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
On Sat, 31 Jul 2004 03:02:09 -0700, Niraj Khandwala <kn****@vsnl.net> wrote:
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Jul 19 '05 #2
Niraj Khandwala wrote:
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
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #3
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4
Niraj Khandwala wrote:
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

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #5
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: shank | last post by:
What's the easiest way to generate CSV or a comma delimited file from an ASP recordset? I've seen a few searching the internet and they appear to be overkill or out of date. thanks
6
by: Skc | last post by:
I am trying to import a file using a custom VB.net procedure, but the problem is it works on a file with pure comma separation and not inverted commas and commas, i.e. it works for AAA,BBB,CCC,DDD...
3
by: Ben | last post by:
Hi all - I am having a bit of trouble and thought maybe someone in this group could shed some light. Here's the skinny... I am creating an automated process to import a bunch of text files...
15
by: Fariba | last post by:
Hello , I am trying to call a mthod with the following signature: AddRole(string Group_Nam, string Description, int permissionmask); Accroding to msdn ,you can mask the permissions using...
4
by: siromega | last post by:
I have a string I'd like to have broken into parts using preg_match. I used a regular expression from the Perl FAQ (http://perlfaq.cpan.org/): push(@new, $+) while $text =~ m{ "(*(?:\\.*)*)",?...
8
by: kingskippus | last post by:
I don't know if this is possible, but I haven't been able to find any information. I have two tables, for example: Table 1 (two columns, id and foo) id foo --- ----- 1 foo_a 2 foo_b
2
by: RSH | last post by:
Hi, I have a situation where I am querying SQL Server and bringing back a Dataset. Is there a way to dump the datatable to a delimited text file without iteration through the datatable? The...
5
by: RyanL | last post by:
I'm a newbie! I have a non-delimited data file that I'd like to convert to delimited. Example... Line in non-delimited file: 0139725635999992000010100534+42050-102800FM-15+1198KAIA Should...
2
by: Bill McCormick | last post by:
Hi, I'm building a C# VS2005 project and I need an elegant way to output query results to an string array or list<Tof delimited strings. Thanks, Bill
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.