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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:20:24+00:00 2026-05-12T09:20:24+00:00

Using a connection string of Provider=SQLOLEDB;Data Source=localhost;User ID=foo;password=bar;Database=CodeLists;Pooling=true;Min Pool Size=20;Max Pool Size=30; I get

  • 0

Using a connection string of

"Provider=SQLOLEDB;Data Source=localhost;User ID=foo;password=bar;Database=CodeLists;Pooling=true;Min Pool Size=20;Max Pool Size=30;"

I get the following stack trace

System.Data.OleDb.OleDbException: No
error message available, result code:
-2147024770(0x8007007E). at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString
constr, DataSourceWrapper&
datasrcWrapper) at
System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
constr, OleDbConnection connection)
at
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo,
DbConnectionPool pool, DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection,
DbConnectionPoolGroup poolGroup) at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory
connectionFactory) at
System.Data.OleDb.OleDbConnection.Open()

I get this error even if I change the server URL from localhost to hkfjhuidhf which is invalid, so I assume it’s an issue on the server with respect to OleDb connection/setup and/or the MDAC.

The server is Windows Server 2003 running the latest service pack and the MDAC is 2.8 SP2.

The code I’m using is:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void run_Click(object sender, EventArgs e)
    {
        output.Text = string.Empty;
        try
        {
            OleDbConnection connection;
            try
            {
                connection = new OleDbConnection(conString.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error creating connection");
                put(ex.ToString());
                return;
            }

            OleDbCommand command;
            try
            {
                command = connection.CreateCommand();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error creating command");
                put(ex.ToString());
                return;
            }

            command.CommandType = CommandType.Text;
            command.CommandText = "select top 10 * from " + table.Text;

            if (connection.State != ConnectionState.Open)
                connection.Open();

            OleDbDataReader reader;

            try
            {
                reader = command.ExecuteReader();

                if (reader.HasRows)
                {
                    string @out = string.Empty;
                    while (reader.Read())
                    {
                        for (int i = 0; i < reader.FieldCount; i++)
                        {
                            @out += reader[i] + ", ";
                        }
                    }
                    put(@out);
                }
                reader.Close();
            }
            catch (Exception ex)
            {
                put(ex.ToString());
            }
            finally
            {
                connection.Close();
            }
        }
        catch (Exception ex)
        {
            put(ex.ToString());
        }

    }

    private void put(string message)
    {
        output.Text += message+Environment.NewLine;
    }
}

And this falls over at the connection.Open()

Does anyone have any ideas? I’ve reinstalled MDAC from the inf file, however I’ve read some articles slating SP2 of MDAC 2.8 with regards to .Net code.

Any and all input is extremely welcome.

  • 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-12T09:20:25+00:00Added an answer on May 12, 2026 at 9:20 am

    It sounds like one or more of the OLEDB components is missing or broken.

    When I had a similar problem, I found that reinstalling MDAC didn’t work – something which the first install did prevented subsequent reinstalls from fixing missing references/files.

    I ended up fixing it by using RegMon to find the failing registry calls, then comparing the keys on which calls failed to a working machine. This will give you a pointer to a missing DLL. I ended up manually re-registering and editing registry entries for 5 or 6 DLLs before I got it working.

    It might be worth also asking on serverfault.

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

Sidebar

Ask A Question

Stats

  • Questions 177k
  • Answers 177k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Take a look at http://docs.jquery.com/Plugins/Autocomplete Also here is a tutorial… May 12, 2026 at 3:26 pm
  • Editorial Team
    Editorial Team added an answer So you're question raises a couple of points that I… May 12, 2026 at 3:26 pm
  • Editorial Team
    Editorial Team added an answer staticboy, Use Linq to SQL and Linq to XML in… May 12, 2026 at 3:26 pm

Related Questions

SQL Express 2005 is running locally. I have a project written by another person
I have an Excel 2007 workbook which I am using to connect to a
We have a Delphi 7 application that runs as an ISAPI extension in IIS6.
I am writing a set of database-driven applications in PHP. These applications will run

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.