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 8723511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:38:48+00:00 2026-06-13T07:38:48+00:00

I am testing out Absolute Database by ComponentAce I have on my Form a

  • 0

I am testing out Absolute Database by ComponentAce

I have on my Form a TABSTable, TABSDatabase and a TDataSource and the data is being displayed in a TDBAdvListView, MultiSelect and RowSelect are True. I have only one Table.

When either one or more of the Items in the TDBAdvListView are selected I want to have the Database Delete the selected Records.

I have tried this way in the code below:

procedure TMain.DeleteEntry2Click(Sender: TObject);
var
  i: Integer;
begin
  with DBAdvListView1.DataSource.DataSet do
  begin
    for i := DBAdvListView1.Items.Count - 1 downto 0 do begin
    if DBAdvListView1.Items[i].Selected then
    begin
      DBAdvListView1.DataSource.DataSet.GotoBookmark(Pointer(DBAdvListView1.Items[i]));
      DBAdvListView1.DataSource.DataSet.Delete;
      end;
    end;
  end;
end;

This always results in an Error Message:

Cannot retrieve record - Native error: 10026

I have very little experience with database programming, what am I doing wrong?

Edit:

I have added a new field into the database named ID as an integer starting from 0 in the hopes that I can reference them with the Locate method and tried with the code below. This produces no error but will only delete the top record in the ListView and if I select more than one it will delete different records than selected.

My new code:

procedure TMain.DeleteEntry2Click(Sender: TObject);
var
  i: Integer;
begin
  with DBAdvListView1.DataSource.DataSet do
  begin
    DBAdvListView1.BeginUpdate;
    First;
    for i := DBAdvListView1.Items.Count - 1 downto 0 do begin
    if DBAdvListView1.Items[i].Selected then
    begin
      if dbTable.Locate('ID',DBAdvListView1.Items[i].Selected,[]) then
      dbTable.Delete;
      Next;
      end;
    end;
  dbTable.Close;
  dbTable.Open;
  DBAdvListView1.EndUpdate;
  end;
end;

The dbTable has to be Closed and Opened to see changes for some strange reason – I have tried Refresh to no avail…

Edit:

// To include Table Structure as requested…

  • ID integer 0
  • Title string 200
  • Author string 100
  • Date string 20
  • Location string 60
  • Category string 100
  • ISBN-13 string 20
  • ISBN-10 string 20

In the Absolute Database Utils directory there is a DatabaseManager.exe which I used to create the actual table with and in here I have also now set a Primary Key of the type:

Type – Primary
Name – ID

The fields for the Index:

ColumnName – ID
CaseInsensitive – False
ASC – True
MaxIndexSize – 20

  • 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-06-13T07:38:50+00:00Added an answer on June 13, 2026 at 7:38 am

    Answer to own question… I remove the selected records with the code below:

    procedure TMain.Button5Click(Sender: TObject);
    var
      i: Integer;
    begin
      with DBAdvListView1 do
        for i := 0 to Items.Count - 1 do
          if Items[i].Selected then
          begin
            Memo1.Lines.Add(Items[i].Caption + ' - Selected!'); //Test for Correct ID's!
          if dbTable.Locate('ID', Items[i].Caption, []) then
          DBAdvListView1.Datasource.DataSet.Delete;
        end;
      dbTable.Close;
      dbTable.Open;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im testing out some database compact code using a simple form to add data
I'm testing out the OpenERP 6.1 web client, and I sometimes have a sales
Anybody out there have experience testing out of process assemblies? I'm testing some Com+
Im testing out something here,so please excuse the css rules.I have got a ul
I am testing out using ADAM and the DSML services. I have two ADAM
I am testing out ajax with Django + jQuery. I have this in my
Testing out Web API for file uploading, have a simple view model like this:
Testing out someone elses code, I noticed a few JSP pages printing funky non-ASCII
In testing out our API, one of our testers found out that when they
I'm testing out faults and exception handling on my service and am seeing odd

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.