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
Solved

Adding a field to an ADO Recordset

Posted on 2002-06-14
3
430 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 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