473,545 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADODB.Recordset .Fields.Update - Method not available

69 New Member
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 10132
JKing
1,206 Recognized Expert Top Contributor
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
2853
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 disconnected ADODB.Recordset from System.Data.DataTable data. Below is the source code I am implementing to test the process. I do not get any error,...
0
1892
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 compiled the VB.Net DLL and registered it so it can be used in the VB6 app using "regasm /tlb:VBNETClass.tlb VBNETClass.dll". From the VB6 app, I...
0
2470
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 exceptions on various part. I have tried both AppendChunk and using a stream object. Unfortunately all the examples I can find in the Net and on the...
0
2883
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 passed to changePass.asp but after creating the code. I am getting this error ADODB.Recordset (0x800A0BB9) Arguments are of the wrong type, are out...
0
1862
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) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. in line objRS.Open mySQL, objConn,adOpenKeyset,...
1
1307
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 ADODB.Connection Dim rs As New ADODB.Recordset Private Sub Form_Load() Set rs = New ADODB.Recordset
10
2221
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 LOCATION 1001 | Oliver | Quezon City 1002 | Paul | Laguna
6
5151
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 have created an ADODB.Recordset in the reports OPEN event, built the necessary records inside of it, and then bound the report to this newly...
9
35373
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() Method of the Recordset Object. This Method varies slightly from DAO to ADO, so for purposes of this discussion, we'll be talking about DAO Recordsets....
0
7479
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5987
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3468
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.