LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default ADO Recordset to Text File

We are trying to return the results of a query as a text file. The
recordset returns too many rows to bring into a spreadsheet. The following
generates a runtime error with the message "Not enough storage to complete
this operation"

Set conn = New ADODB.Connection
connn.Open "driver={SQL
Server};server=chtsrvessb01;database=SRAdmin;uid=; pwd="

rs.CursorLocation = adUseClient
strSQL = Sheets("Ref").Range("B1").Value

Set rs = conn.Execute(strSQL)

#1 = Freefile
Open strLoc For Output as #1

Print #1, rs.GetString()
Close #1


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel VBA - open text file, replace text, save file? Cybert Excel Programming 2 October 2nd 04 01:05 AM
Type recordset/recordset? FlaviusFlav[_9_] Excel Programming 4 May 24th 04 12:16 PM
convert an ADO recordset to a text file that can be queried with SQL RB Smissaert Excel Programming 0 September 1st 03 12:11 PM
create recordset from csv file on web Robbie[_2_] Excel Programming 0 August 12th 03 04:00 AM
Recordset Opening Excel File Seth[_3_] Excel Programming 0 August 1st 03 01:52 PM


All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"