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

  • SEARCH
  • Home
  • 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 780293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:03:02+00:00 2026-05-14T20:03:02+00:00

i am updating a table in mysql using ADODB i am adding new entries

  • 0

i am updating a table in mysql using ADODB

i am adding new entries into a table
should i be using addnew or update?

  • 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-14T20:03:03+00:00Added an answer on May 14, 2026 at 8:03 pm

    There’s no difference, you will always use .Update to commit changes from where the current cursor is pointing at. AddNew allocates new row at the end of ADODB recordset

    ADODB recordset is a cursor-based data set, when you load rows into recordset, the cursor is automatically on first row, so anything you do on recordset’s columns, it will modify wherever the recordset cursor is currently pointing at. For example:

    dim rs as new adodb.recordset
    rs.Open _
        " select emp_id, lastname, firstname, middlename, age from emp " & _
        " where location = 'LIVERPOOL'" & _
        " ORDER BY emp_id", connectionVariableHere
    

    This will update the first row:

    rs!middlename = "Ono"
    rs.Update
    

    This will update the next row:

    rs.MoveNext
    rs!middlename = "Eastman"
    rs.Update
    

    To add a record (the cursor will move to last record)

    rs.AddNew
    rs!lastname = "Ono"
    rs!firstname = "Yoko"
    rs!middlename = "Yasuda"
    rs.Update
    

    This will update the last added record, after performing the step above:

    rs!lastname = "Lennon"
    rs.Update
    

    If i remember correctly, MoveNext, MoveFirst, etc, implicitly call .Update before moving to new cursor location, so if you are in first row…

    rs.MoveFirst
    

    …Then you do:

    rs!age = 70 ' lennon's age of 2010
    rs.MoveNext
    

    …That will call .Update before moving to Paul McCartney. Anyway, don’t rely on it, just call .Update when you want to commit the changes on row

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

Sidebar

Related Questions

I'm updating a program and adding a new table to the database. The program
I am having difficulty updating a table via PHP. Using MySQL prompt or a
I am having a problem updating several rows of a mysql table using a
I'm using Asp.net c# and MYSql as back-end. I'm updating a table,but table is
I'm using this php code to update a table, but nothing is updating? if(isset($Submit))
I am using InnoDB for a MySQL table, and obviously queries using LIKE and
I am trying to update thable with select using limit It's update table fine
So I'm writing a python script that is updating values in a mysql table.
I'm having the following problem using Django with MySQL 5.5.22. Given a table with
So I'm using PHP/MySQL and I have a tbl_profile table with the following fields:

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.