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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:03:09+00:00 2026-05-18T05:03:09+00:00

I seem to have the luck to run into the funniest problems while deploying

  • 0

I seem to have the luck to run into the funniest problems while deploying my software.

Setup:

  • Windows 2000 Prof.
  • .NET 2.0 Application
  • Connection to MySQL 5.0 via ODBCConnection using the MySQL ODBC-Connector 3.51.26

I was deploying my application while I was running into this exception:

at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut)
at System.Data.Odbc.OdbcDataReader.internalGetString(Int32 i)
at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i, TypeMap typemap)
at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i)
at System.Data.Odbc.OdbcDataReader.GetValues(Object[] values)
at MyAppl.UninterestingStackTace.StartsHere()

Yes, that’s only the stacktrace…because there is no Exception-Message, there’s also no InnerException (I also log those since my last encounter), this is all I got.

The code looks like this:

// DtRdr is a passed in ODBCDataReader
if (DtRdr != null && !DtRdr.IsClosed)
{
    Object[] buffer = new Object[DtRdr.FieldCount];

    while (DtRdr.Read())
    {
        DtRdr.GetValues(buffer); // Here happens the exception

        // Modify buffer and use it
    }
}

It’s only happening on that machine, the fetched data/database is good (verified it via another machine on the same network and I also tested it locally on my dev-machine) and of course it’s not reproducible on any other machine.

While looking at it in Reflector, I realize that it seems to be a problem with reading the data from the connection. All other operations are working fine, I can access the data directly, only GetValues fails.

I wrote a fast and simple test application which yields the same error, but also outputs the following statement after terminating:

Error in my_thread_global_end(): 1 threads didn't exit

I’m not sure if this is related or not, so sorry for the confusion.

I’m lost once again…has anyone seen something like this before?

Edit: Here’s my test application:

using System;
using System.Data;
using System.Data.Odbc;

namespace ODBCTest
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            try {
                Console.WriteLine ("Creating connection...");
                using (OdbcConnection conn = new OdbcConnection ("ConnStringHere")) {
                    conn.Open ();
                    Console.WriteLine ("Creating command...");
                    using (OdbcCommand cmd = conn.CreateCommand ()) {
                        cmd.CommandText = "SimpleSelectHere;";

                        Console.WriteLine ("Creating reader...");
                        using (OdbcDataReader rdr = cmd.ExecuteReader ()) {
                            if (rdr != null && !rdr.IsClosed) {
                                while (rdr.Read ()) {
                                    object[] temp = new object[rdr.FieldCount];
                                    rdr.GetValues (temp);
                                }

                                Console.WriteLine ("Seems to work fine.");
                            } else {
                                Console.WriteLine ("Could not create reader!");
                            }
                        }
                    }
                }
            } catch (Exception ex) {
                Console.WriteLine (ex.Message);
                Console.WriteLine (ex.StackTrace);
                Console.WriteLine ();
                if (ex.InnerException != null)
                {
                    Console.WriteLine (ex.InnerException.Message);
                    Console.WriteLine (ex.InnerException.StackTrace);
                } else {
                    Console.WriteLine("No InnerException.");
                }
            }

            Console.ReadKey ();
        }
    }
}

And it’s output:

Creating connection...
Creating command...
Creating reader...

   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut)
   at System.Data.Odbc.OdbcDataReader.internalGetString(Int32 i)
   at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i, TypeMap typemap)
   at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i)
   at System.Data.Odbc.OdbcDataReader.GetValues(Object[] values)
   at ODBCTest.MainClass.Main(String[] args)

No InnerException.
<At this point I hit a key>
Error in my_thread_global_end(): 1 threads didn't exit
  • 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-18T05:03:09+00:00Added an answer on May 18, 2026 at 5:03 am

    I’ll be damned! This is a bug in the MDAC 2.7, installing 2.8 (or the hotfix) fixes this.

    And the thread-error message is a bug in the used MySQL ODBC-Connector.

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

Sidebar

Related Questions

No related questions found

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.