Bug #26777 ADO "Descriptor type out of range" with MyODBC v5.00.12
Submitted: 1 Mar 2007 23:52 Modified: 4 Oct 2007 19:24
Reporter: Michael Pryor (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S1 (Critical)
Version:5.0.12 (20070619 build) OS:Windows (Windows)
Assigned to: Erica Moss CPU Architecture:Any
Tags: ADO

[1 Mar 2007 23:52] Michael Pryor
ADO + MyODBC 5.0 won't insert any strings using the ADO command object (which works fine with previous (3) versions of the connector)

Please see the forum posting here where another user has the same problem:

How to repeat:
For code to reproduce do the following:

mysql> create database test;
mysql> use database test;
mysql> create table A ( b varchar(30) );

Create a file called test.asp in your c:\inetpub\wwwroot directory (or any other virtual directory)

Put this in it:

Dim db: Set db = Server.CreateObject("ADODB.Connection")
db.Open "DRIVER={MySQL Connector/ODBC v5};server=localhost;uid=root;pwd=password;database=test;Option=3;"

Dim cmd: Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = db
cmd.CommandText = "INSERT INTO A values(?)"
cmd.Parameters.Append cmd.CreateParameter("b", 200, &h001, 255, Null)
cmd(0) = "foo"


Note that the second argument to the cmd.CreateParameter call above is the "type" of the argument .. in this case 200 is for varchar, but I ran this code through a loop from 1 to 500 trying every possible type and the Command object never inserted the string at any point (so varwchar, longvarchar, etc... none of the constants worked).
[8 Mar 2007 0:24] Jess Balint

Thanks for your bug report. We are unable to reproduce this bug on a recent nightly build. Please download the latest nightly build from the following url:


You will need to extract the archive and following the instructions contained in the "README.binary" file. Please confirm if this is still an outstanding bug.

If you still experience the problem, please enable ODBC trace logging through the "Data Source Administrator" applet and attach the log to this bug report.

[9 Mar 2007 2:44] Michael Pryor
Verified.  This does _NOT_ happen in the latest nightly build 20070307
[31 May 2007 15:09] Harold Droge

Don't seem to be able to open (extract) downloaded nightly builds. Keeps telling its not a valid archive?

Kind regards,
[31 May 2007 20:23] Erica Moss
Use this utility to expand the archive.
[13 Jul 2007 14:40] Michael Pryor
This bug is back! :)
Same repro steps, except the new error is:

[MySQL][MyODBC 5.00.12] Descriptor type out of range
[13 Jul 2007 14:50] Michael Pryor
Updating title
[13 Jul 2007 16:32] Jason Williams
Hi Guys,

It would be very helpful to us if this could be resolved. We really need the UTF-8 abilities of Connector/ODBC 5 and this is preventing us from being able to use this. Thank you in advance.
[4 Oct 2007 19:24] Michael Pryor
I'm closing this bug because this is currently fixed in the 5.1 alpha release