473,246 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

ADODB.Recordset.Fields.Update - Method not available

All,

I have a ADODB.Recordset in my Access 2002 project. I've been able to successfully add fields to the record set. According the the MS Access help files, I now must update the recordset to get the field additions to "stick." For example, the code below shows how the Access help files say to append fields to a ADO recordset.

Expand|Select|Wrap|Line Numbers
  1. dim ADO_RS as ADODB.Recordset
  2.  
  3. set ADO_RS = (some other ADODB recordset)
  4. ADO_RS.Close
  5. ADO_RS.Fields.Append  (Name), (Type), (Size)
  6. ADO_RS.Fields.Update
However, when I try to write the last line of code (above) in VB, I don't get the "Update" method as one of my autofill choices. If I just go ahead and type in "Update", when the code runs I get a compile error "Method or data member not found"

The Access help file says that "Update" is a valid method for the ADODB.Fields object, but the VB editor says it isn't. Even the Object Browser in the VB editor doesn't list "Update" and a valid object.

Is there a reference I'm missing? How can I get the field additions to the ADODB.Recordset to "stick"?

I've tried running my code without the update. When I put a watch on the recordset, I can see my fields getting added. But as soon as I use the Open method to begin adding data to the recordset, the fields I added disappear.

Thanks for your time and help,
Scott
Oct 5 '07 #1
1 10065
JKing
1,206 Expert 1GB
All,

I have a ADODB.Recordset in my Access 2002 project. I've been able to successfully add fields to the record set. According the the MS Access help files, I now must update the recordset to get the field additions to "stick." For example, the code below shows how the Access help files say to append fields to a ADO recordset.

Expand|Select|Wrap|Line Numbers
  1. dim ADO_RS as ADODB.Recordset
  2.  
  3. set ADO_RS = (some other ADODB recordset)
  4. ADO_RS.Close
  5. ADO_RS.Fields.Append  (Name), (Type), (Size)
  6. ADO_RS.Fields.Update
However, when I try to write the last line of code (above) in VB, I don't get the "Update" method as one of my autofill choices. If I just go ahead and type in "Update", when the code runs I get a compile error "Method or data member not found"

The Access help file says that "Update" is a valid method for the ADODB.Fields object, but the VB editor says it isn't. Even the Object Browser in the VB editor doesn't list "Update" and a valid object.

Is there a reference I'm missing? How can I get the field additions to the ADODB.Recordset to "stick"?

I've tried running my code without the update. When I put a watch on the recordset, I can see my fields getting added. But as soon as I use the Open method to begin adding data to the recordset, the fields I added disappear.

Thanks for your time and help,
Scott

Try this:

Expand|Select|Wrap|Line Numbers
  1. Dim ADO_RS As ADODB.Recordset
  2.  
  3. set ADO_RS = (some other ADODB recordset)
  4. ADO_RS.Close
  5. ADO_RS.Fields.Append  (Name), (Type), (Size)
  6. ADO_RS.Update
  7.  
Oct 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: elcc1958 | last post by:
I need to support a VB6 application that will be receiving disconnected ADODB.Recordset from out DotNet solution. Our dotnet solution deals with System.Data.DataTable. I need to populate a...
0
by: Dot Netizen | last post by:
I am having trouble passing an ADODB.Recordset from a VB6 application to a VB.Net class library using COM Interop. I am running this on XP SP2 with the .Net Framework 1.1 and MDAC 2.8 SP1. I've...
0
by: Channing Jones | last post by:
Hello everyone, I am trying to store data in a binary field of an SQL-Server table using ADODB. So far, I have managed to store a record but not any data in the binary field. I only get...
0
by: Vash10 | last post by:
I have two asp files. Login.asp and changePass.asp. what i want to do is to make the user change his password after his first login. so what happens is login.asp is the first to be used then it is...
0
by: sonasiva | last post by:
hai Iam creating website using ASP i wnts my clients to register first to vist site using username and password,,this i need to do iam getting error like this ADODB.Recordset (0x800A0BB9)...
1
by: pramodrepaka | last post by:
i am not able to add records with the help of ADODB. what is the problem i am not able to understand please help me. this is the code i written In General Declaration Dim cn As New...
10
by: chuckzter | last post by:
Hey guys, I would like to know how to replace values in your database via ADODB. Example: (I would want to replace the value LOCATION of ID 1001 which is Oliver to Laguna.) ID NAME...
6
by: Oko | last post by:
I'm currently developing an MS Access Data Project (.adp) in MS Access 2002. One of the reports within the DB uses data that is Dynamic and cannot be stored on the SQL Server. To resolve this, I...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.