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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:54:43+00:00 2026-06-17T06:54:43+00:00

We have an old application that was written in Delphi 7. It is currently

  • 0

We have an old application that was written in Delphi 7. It is currently connected to an old Oracle Lite database that is being retired. The powers that be have chosen to move the data to a Microsoft SQL Server Compact database instead. After sepending a good amount of time moving everything over to the SQL CE database, I am now tasked with getting the Delphi application to play nice with the new databases.

The people who are supposed to be smarter than I am (my boss), tell me that I should be able to simply modify the connection and everything should be back in order. However, I have been banging my head against my monitor for two days trying to get the ADO connection in the Delphi application to work with our new SQL CE database.

A slightly simplified example of what I’m working with:

The connection is made in a global object with a TADOConnection named “adoConn”:

procedure TGlobal.DataModuleCreate(Sender: TObject);
begin
    adoConn.ConnectionString := 'Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=path\db.sdf;';
    adoConn.Connected := True;
end;

Shortly after this, a procedure is called to populate some messages. In an effort to trouble shoot the application, I’ve simplified the code to make a simple query and show the results in a message box. The procedure receives a parameter for the SQL string, but I’m ignoring it for now and manually inserting a simple select statement:

procedure Select(const SQL: string);
var
    adoQuery : TADOQuery;
begin
    adoQuery := TADOQuery.Create(nil);
    try
        adoQuery.Connection := Global.adoConn;
        adoQuery.SQL.Text := 'select * from CLT_MESSAGES';
        adoQuery.ExecSQL;
        While not adoQuery.Eof do
        begin
            // Here I just created a MessageDlg to output a couple of fields.
            adoQuery.Next;
        end;
    finally
        adoQuery.Free;
    end;
end;

Everything compiles just fine, but when I run the application I get the following error:

“Multiple-step operation generated errors. Check each status value.”

I’ve done some additional trouble-shooting and found that the error is happening at adoQuery.ExecSQL. I’ve tried several different versions of the connection string and a couple different ways of trying to query the data, but it all ends up the same. I either can’t connect to the database or I get that stupid “Mutliple-step” error.

I appreciate, in advance, any assistance that can be offered.

  • 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-17T06:54:44+00:00Added an answer on June 17, 2026 at 6:54 am

    Don’t use ExecSQL for queries that return recordsets.

    Set either the AdoQuery.Active property to True or use AdoQuery.Open to execute a SELECT statement.

    UPDATE

    After changing your code we see the real error which is DB_E_OBJECTOPEN.

    UPDATE2

    After digging deeper it seems that this is a known bug in the OLE DB provider and nvarchar fields bigger than 127 characters.

    these references seem to confirm this:

    SO: SQL Server Compact Edition 3.5 gives "Multiple-step operation generated errors" error for simple query

    ref1: http://www.tech-archive.net/Archive/SQL-Server/microsoft.public.sqlserver.ce/2008-07/msg00019.html

    ref2: https://forums.embarcadero.com/thread.jspa?messageID=474517

    ref3: http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/48815888-d4ee-42dd-b712-2168639e973c

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

Sidebar

Related Questions

We have an old (written in CakePHP 1.1!) application that has started groaning under
I have an old application that uses frames (not iframes) was was written back
We have an old application written using VC++ that uses ODBC driver to read
I have an application written in Delphi 6 that uses the Indy 9.0.18 HTTP
I have a 3yr old application that has some controllers with some very unrestful
I have some old code (an old but still maintained VB6 application) that from
I have an application that is responsible for archiving old applications, which will do
I have a rails application that about 3 years old, and I'm having a
I have an old function that is called many times in my application. I
I have in here an old web application written in ASP.Net 2.0 + AJAX.

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.