Read an entire ado recordset row?

Is there a way to read the entire recordset row in order to write to a file in one shot and add delimeters to the fields without looping through each field?
surfsista9Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Naveen SwamyYash Infinite Solutions Private LimitedCommented:
getrows and getstring

check out there help and use it, it is far better than using/looping the rs objects
mah8473Commented:
You could try incorporating DTS (Data Transformation Services) and Scripting.FileSystemObject, it's a bit long winded but it should work. Infact you could suck the whole recordset in as a DTSFlatFile and spit the lot out to you delimited text file.

Depending on how your retrieving your recordset? If its coming out of SQL using a stored Procedure it should be pretty easy.

check this out:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtssql/dts_basic_5zg3.asp
mah8473Commented:
Navstar16,

good point getrows would be A hell of a lot easier!!!!!!!!!!!!!
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

surfsista9Author Commented:
The recordset is coming out of sql. I'd like something that sucks the entire recordset into a file with the option to delimit fields and crlf at each record.

I'll check out DTSFlatFile.
Leo EikelmanDirector, IT and Business DevelopmentCommented:
I don't know if there is such a solution, but this one is close


Dim rs as recordset
'Fill your recordset from database
.....
....
...
..

'and write this code
Dim strRS as string
Open "c:\rs.csv" for output as #1
while not rs.eof
 strRS=rs.GetString(adClipString,1,vbTab,vbTab,Empty)
 print #1,strData
 ' dont use rs.MoveNext
wend
close #1
set rs=nothing

you can fiddle with the .GetString method to get the format u want

Cheers,

Leo

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Leo EikelmanDirector, IT and Business DevelopmentCommented:
: )
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.