Advertisement

06.16.2007 at 09:23PM PDT, ID: 22638901
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

Exporting an ADODB recordset to an external file

Asked by picoallen in Access Coding/Macros

Tags: , ,

Hello,

I need to create a procedure that accepts an ADO recordset and exports it to an external file (a table in another database file, or a text file).

Is this possible?

There is an ADODB.Recordset.Save method, but it saves the recordset as a persistent recordset that can then be reopened at a later stage using ADO. This is not what I want. I want the exported data to be exported into a standard MS Access table in an MS Access file, or to a raw text file.

I imagined that the solution would be something along the lines of :

   Sub ExportRecordset(strSQL, strConnectionString, strFilePath)

      Dim rst as New ADODB.Recordset
      Dim strSQL as String

      rst.Open strSQL, strConnectionString, , , adCmdText      ' This is correct

      rst.Export strFilePath, adText         ' But I can't find anything like this ...

   End sub

NB 1:
I know how to programatically create and manipulate Access .mdb files, how to export tables and other objects to them, and also know how to execute make-table and append queries to put data into them. What I'm seeking to do here is achieve the export using an ADODB recordset as the data source.

NB 2:
As a work-around I also know how to loop through a recordset and to write the data, record-by-record, to an external file. I'll do this as a last resort, but I'm hoping that there is a much simpler way to accomplish the same result.

ThanksStart Free Trial
[+][-]06.16.2007 at 10:17PM PDT, ID: 19301519

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.16.2007 at 11:05PM PDT, ID: 19301604

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2007 at 03:40AM PDT, ID: 19301942

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2007 at 05:53AM PDT, ID: 19302191

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Coding/Macros
Tags: recordset, ado, file
Sign Up Now!
Solution Provided By: wsh2
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.17.2007 at 07:10AM PDT, ID: 19302328

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2007 at 07:44AM PDT, ID: 19302396

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2007 at 08:04AM PDT, ID: 19302440

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2007 at 08:11AM PDT, ID: 19302451

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2007 at 08:55PM PDT, ID: 19304728

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2007 at 10:32PM PDT, ID: 19304905

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2007 at 07:02PM PDT, ID: 19312635

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2007 at 09:12PM PDT, ID: 19313109

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.19.2007 at 12:30AM PDT, ID: 19313894

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43