Bug #30199 ERROR [HY010] [MySQL][MyODBC 5.00.11] column count unknown at this time
Submitted: 2 Aug 2007 7:35 Modified: 4 Jan 2008 0:28
Reporter: Guillot David Email Updates:
Status: Won't fix Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.00.11 OS:Windows
Assigned to: CPU Architecture:Any
Tags: With VB .Net and ADO .Net

[2 Aug 2007 7:35] Guillot David
Description:
Doesn't support Update with OdbcCommandBuilder

It's Ok with Odbc Access, SQL Serveur, Postgre, Firebird, Oracle

How to repeat:
    Dim conDSN As New Odbc.OdbcConnection(DSN=Test; Database=db; User Id=sa; Password=sa;)
    Dim cmdODBC As New Odbc.OdbcCommand("Select * From Table Where Table_Id = 1")

    cmdODBC.CommandType = CommandType.Text
    conDSN.Open

    Dim gb_adaptateurODBC As Odbc.OdbcDataAdapter
    Dim datasetODBC As New DataSet
    gb_adaptateurODBC = New Odbc.OdbcDataAdapter(cmdODBC.CommandText, conDSN)

    gb_adaptateurODBC.Fill(datasetODBC,"Table")

    .../... Modify data

    Dim ObjetCommandBuilder As New Odbc.OdbcCommandBuilder(gb_adaptateurODBC)

    gb_adaptateurODBC.Update(datasetODBC)     
    'ERROR [HY010] [MySQL][MyODBC 5.00.11] column count unknown at this time

    datasetODBC = Nothing
[3 Aug 2007 7:32] Tonci Grgin
Hi David and thanks for your report. I have two things for you to try before I rule on this:
 1) Please use test case (modify if necessary) from Bug#18755 and retry. Inform me of result.
 2) Try with latest MyODBC 3.51 as it is GA while 5.0.11 is still beta.
[3 Aug 2007 8:40] Guillot David
Thanks Tonci Grgin,

it's OK with the latest MyODBC 3.51.

I don't use test case from Bug#18755 cause i have no UNSIGNED BIGINT columns.

Thank's a lot and good way.
[3 Aug 2007 9:45] Tonci Grgin
David, I just feel code in Bug#18755 is good, generally, it doesn't have to be BIGINT you can test with it...

Glad things work now!

As for v5, verified as described.
[12 Aug 2007 11:59] Cameron Townshend
This happens to me too. I am trying to migrate data from mySQL into SQL Server 2005 using SSIS. I connect using ODBC 5 driver and it crashes when I then attempt to read data. Version 3.51 driver works ok in SSIS, however doesn't work with MSaccess or Microsoft Query/Excel etc.
[20 Aug 2007 16:12] Jesse Longoria
I get thie error too.  I am creating a report in MS Visual studio 2005 that uses the .Net connector to connect to a mysql database.  When creating the connection in the report designer I can execute a simple query such as select * from tblcustomers.  But, when I go to the next step in the report designer, I rcv the error.
[29 Aug 2007 15:51] [ name withheld ]
A mi me ha ocurrido al intentar crea un universo en Business Objects e intentar leer las tablas del datawarehouse que está en MySql.
[30 Aug 2007 12:09] Susanne Ebrecht
Hi all,

the error don't occure in MyODBC version 3.51.19. Please use this version because version 5 is still beta.

Regards,

Susanne
[4 Jan 2008 0:28] Jess Balint
MySQL Connector/ODBC 5.0 has be discontinued. Please use the 3.51 stable series of the 5.1 beta series of drivers.