Link to home
Start Free TrialLog in
Avatar of surfsista9
surfsista9

asked on

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?
Avatar of Naveen Swamy
Naveen Swamy

getrows and getstring

check out there help and use it, it is far better than using/looping the rs objects
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
Navstar16,

good point getrows would be A hell of a lot easier!!!!!!!!!!!!!
Avatar of surfsista9

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Leo Eikelman
Leo Eikelman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial