Solved

Adding a field to an ADO Recordset

Posted on 2002-06-14
3
433 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

724 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