Re: OdbcDataAdapter and MySQL

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Austin Ehlers (the*bored*guy*16_at_hotmail.com)
Date: 03/16/04


Date: Tue, 16 Mar 2004 00:45:08 -0600

On 13 Mar 2004 03:49:08 -0800, thorsson_mikael@hotmail.com (Mikael
Thorsson) wrote:

>Sorry, same problem I'm afraid :(
>
>I guess this means that there's something fishy about my setup? Here
>is a list of the versions of the references that I have in my project.
>Can you please tell me if you see any problems here?
>
>Microsoft.Data.Odbc, version 1.0.3300.0
>System, System.Data, System.Drawing, System.Windows.Forms, System.XML,
>all version 1.0.5000.0.
>
>I added the odbc reference by browsing to
>
>C:\Program Files\Microsoft.NET\Odbc.Net\Microsoft.Data.Odbc.dll
>
>I'm running XP Professional SP1 and I also installed the latest MDAC.
>
>Any ideas appreciated!

Two things that might be going on:

1) Don't use Microsoft.Data.Odbc reference; use System.Data
reference, and "using System.Data; using System.Data.Odbc;" instead.
You'll need ODBC.NET driver (not included with VS):
http://www.microsoft.com/downloads/details.aspx?FamilyId=6CCD8427-1017-4F33-A062-D165078E32B1&displaylang=en

Configure the driver in Control Panel>Administrative Tools>Data
Sources. Select "System DSN">Add>MySQL ODBC 3.51 Driver DSN. Use the
following code to connect:

OdbcConnection conn=new OdbcConnection("DSN=/*the name you chose
just*/");

2) I remember reading somewhere that the Odbc driver has a problem
with certain types of tables, specifically MyISAM types. Try changing
it to InnoDB.

Austin



Relevant Pages

  • Re: Unresolved Externals creating driver
    ... usbpdi.obj: error LNK2019: unresolved external symbol ... > an identical driver, under a different name. ... > I get in this vicious circle of putting in a reference to a library, ... > having the build complain about multiply defined symbols. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [PATCH 1/1] : hwmon - new chip driver for TI ADS7828 A-D
    ... revised patch. ... driver, which seems to work well with the hardware I'm working with (a ... Operate with the internal 2.5v reference - set to N for external reference ...
    (Linux-Kernel)
  • Device callback object isnt referenced by the framework
    ... a while using "Developing Drivers with the Windows Driver Foundation" and the ... callback object doesn't implement any of the interfaces, ... I noticed that the fx won't take a reference to my device object as ... my driver crashes when they try to reference my device callback object ...
    (microsoft.public.development.device.drivers)
  • Re: [PATCH] fix rmmod sbp2 hang in 2.6.7
    ... Is the 'sg' driver loaded. ... When I load my SCSI HBA driver, ... It's because sg also got a reference. ... rmmod 'sg' then the rmmod of st frees up too. ...
    (Linux-Kernel)
  • Re: help pls.........
    ... If the forms are in the WB, then there's no need for any ODBC etc stuff. ... You can reference the WS directly. ... I have a workbook named WBOOK with I think 20 worksheets. ... What I want to do is to be able to edit and delete data from worksheets ...
    (microsoft.public.excel.programming)