Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3485528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:55:07+00:00 2026-05-18T10:55:07+00:00

This code editing a recordset based on joined tables works in DAO/.mdb database RS.Edit

  • 0

This code editing a recordset based on joined tables works in DAO/.mdb database

     RS.Edit 
            RS.fields("fieldA").value = 0  'in table A
            RS.fields("fieldB").value = 0  ' in table B                
     RS.Update

The code was converted to ado on a sql server database and it failed with an error message:

Run-time error ‘-2147467259′ (80004005)’ :
Cannot insert or update columns from multiple tables.

However it appears to work if it is altered like so :

            RS.fields("fieldA").value = 0  'in table A
     RS.Update
            RS.fields("fieldB").value = 0  ' in table B                
     RS.Update

Is this a normal way to do things with sql server or is there a gotcha to it.
I ask because when trying to find a solution (before I put in the extra update statement) I changed the recordset type to batchoptimistic and I got no error messge but only one table’s record was edited.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:55:07+00:00Added an answer on May 18, 2026 at 10:55 am

    Apparently, the data source of your recordset is an SQL returning data from multiple tables. Yes, it’s normal that you can only update one table at a time. If you want to update values from multiple tables in a single, atomic step (so that no other client use can read the “intermediate value”, where one table is changed but the other is not), you need to use a transaction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am updating an existing ASP .NET site. This site has a custom grid
Here is the error: http://screencast.com/t/ZDVhNmJiOTgt Please help, here is my code: what can I
I have modified the Nerd Dinner application to allow editing of child records by
Here's the specs: ASP.NET 3.5 using ASP.NET AJAX AJAX Control Toolkit jQuery 1.3.2 web
UPDATE OK, I figured it out. I had to call the following for varieties:
I have a gridview within an updatepanel which allows paging and has a linkbutton
I have a simple form in codeigniter that I wish to use for the
Very simple problem: I have a Public Sub (in a module) that I want
In my cakephp app I have an Option model. In my option/index view I
I was trying to chart some RTD data and accidentally ended up with hundreds

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.