devxlogo

Inserting and deleting rows in table (Jet 3.0)

Inserting and deleting rows in table (Jet 3.0)

Question:
How can I add a row (recordset) so it gets inserted where it belongs, in alphabetical order? I use Jet 3.0, and when I update my database (.mdb), rows are inserted at the end.

Also, how can I delete a current row in my table? By “current,” I mean the one currently loaded by data control.

Answer:
I believe your question relates to Visual Basic and the Jet engine.Unfortunately, there is no way to insert a record with Visual Basic into any position other than the end.

You have two options:

  1. Re-fetch all the data in sorted order after each insert, or
  2. Switch to Oracle Power Objects, which has this functionality.

See also  Professionalism Starts in Your Inbox: Keys to Presenting Your Best Self in Email
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist