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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:25:59+00:00 2026-05-15T10:25:59+00:00

Recently I met a strange problem, see code snips as below: var sqlCommand: string;

  • 0

Recently I met a strange problem, see code snips as below:

var
  sqlCommand: string;
  connection: TADOConnection;
  qry: TADOQuery;
begin
  connection := TADOConnection.Create(nil);
  try
    connection.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Test.MDB;Persist Security Info=False';
    connection.Open();
    qry := TADOQuery.Create(nil);
    try
      qry.Connection := connection;
      qry.SQL.Text := 'Select * from aaa';
      qry.Open;

      qry.Append;
      qry.FieldByName('TestField1').AsString := 'test';

      qry.Post;
      beep;
    finally
      qry.Free;
    end;
  finally
    connection.Free;
  end;
end;

First, Create a new access database named test.mdb and put it under the directory of this test project, we can create a new table named aaa in it which has only one text type field named TestField1.

We set a breakpoint at line of “beep”, then lunch the test application under ide debug mode, when ide stops at the breakpoint line (qry.post has been executed), at this time we use microsoft access to open test.mdb and open table aaa you will find there are no any changes in table aaa, if you let the ide continue running after pressing f9 you can find a new record is inserted in to table aaa, but if you press ctrl+f2 to terminate the application at the breakpoint, you will find the table aaa has no record been inserted, but in normal circumstance, a new record should be inserted in to the table aaa after qry.post executed.
who can explain this problem , it troubles me so long time. thanks !!!

BTW, the ide is delphi 2010, and the access mdb file is created by microsoft access 2007 under windows 7

  • 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-15T10:26:00+00:00Added an answer on May 15, 2026 at 10:26 am

    Marjan, thanks for your response again, but i can’t accept this behaviour what the connection enginee processes, today I find something useful on MSDN website, see:

    http://msdn.microsoft.com/en-us/library/ms719649(v=VS.85).aspx

    I have resolved the problem fortunately according to the article, Actually, the default value of the property “Jet OLEDB:Implicit Commit Sync” is false, According to the explanation of this property, Be false implies that the implicit transaction will use asynchronouse mode. so what we can do is set this property be true by using code snips as below :

    connection.Properties.Item['Jet OLEDB:Implicit Commit Sync'].Value := true;
    

    BTW, according to that article, this property can only be set by using the Properties property of the connection object, otherwise if it is set in connection string, an error will occur

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

Sidebar

Related Questions

I met a very strange problem recently. I want to control the ListBoxItem's render
recently, while reading former's code in my current project, I encounter the problems below:
Recently, we discovered odd behavior in some old code. This code has worked for
Recently downloaded some code for a minor open-source project related to a small webgame
I met with such question about msgget recently. while(1) { msqid = msgget(IPC_PRIVATE,IPC_CREAT); if(msqid<0)
My java class (servlet) has been running fine, but recently, I noticed a problem.
Recently I found some simple source code of a bootloader.The following is the simple
Recently I asked a question on stackoverflow about multiline tabs. Below is the link
Recently I met the following exception at C# solution: Error 2 Could not load
Possible Duplicate: “Least Astonishment” in Python: The Mutable Default Argument I recently met a

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.