Solved

Adding a field to an ADO Recordset

Posted on 2002-06-14
3
429 Views
Last Modified: 2013-11-25
I'm kind of embarrassed to ask this, but how does one go about adding a field to an ADO recordset?

I populated the recordset with a query against an Oracle database and now i want to add a field to the recordset.  I tried:

rsTest.Fields.Append "FieldName", adBoolean

I get the error:
Argument not optional.

I assume I need to do something with a collection or something?  Thanks
-Jacob
0
Comment
Question by:dentyne
3 Comments
 
LVL 5

Expert Comment

by:rpai
ID: 7079255
You can only append fields to a Recordset that is not open and has not yet been connected to a data source. A run-time error will occur if the Append method is called on the Fields collection of an open Recordset, or on a Recordset where the ActiveConnection property has been set.
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 7079276
0
 
LVL 1

Author Comment

by:dentyne
ID: 7079303
Thanks.  The code you referred me to will solve my problem.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now