[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Adding a field to an ADO Recordset

Posted on 2002-06-14
3
Medium Priority
?
435 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 200 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

Industry Leaders: 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…
Suggested Courses

649 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