Solved

Adding a field to an ADO Recordset

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 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

13 Experts available now in Live!

Get 1:1 Help Now