Microsoft.Data.Odbc namespace not recognized.

Last post 10-26-2003 3:16 PM by patber. 5 replies.

Sort Posts:

  • Microsoft.Data.Odbc namespace not recognized.

    07-10-2003, 8:43 PM
    • Member
      15 point Member
    • bmoyet
    • Member since 04-14-2003, 9:39 PM
    • Posts 3
    New to mySQL, using asp.net(vb.net-fairly new) trying to connect to mySQL database. (i have classic asp pages connecting to mysql for a forum, so i'm pretty sure it's .net related)

    i'm following this example http://www.mysql.com/articles/dotnet/#ODBC.NET

    when i try to reference the namespace (Microsoft.Data.Odbc ) it's not recognized. The following are installed on my computer:

    .NET 1.1
    mySQL 4.0.13
    ODBC .NET Data Provider
    Microsoft fix for .net data provider (FIX: ODBC Driver Manager Incorrectly Reports SQL_NO_DATA_FOUND for ANSI Driver)
    mySQL ODBC driver 2.50 (needed for snitz forums) - also noticed 3.51 is also installed.

    (and i did reboot after all installs)

    does anyone know of any issues and why i can't reference the namespace?
  • Re: Microsoft.Data.Odbc namespace not recognized.

    07-18-2003, 12:11 AM
    • Member
      185 point Member
    • Malby
    • Member since 06-26-2002, 6:53 PM
    • Posts 37
    Namespace changed from v1.0 to v1.1 of the .net runtime.

    Its now System.Data.Odbc

    so whereever you have a

    using Microsoft.Data.Odbc; statement, change it to using System.Data.Odbc;
  • Re: Microsoft.Data.Odbc namespace not recognized.

    07-18-2003, 12:33 AM
    • Member
      185 point Member
    • Malby
    • Member since 06-26-2002, 6:53 PM
    • Posts 37
    Sorry, I didn't realise you were using VB.NET

    It should be:

    Imports System.Data.Odbc

    Regards,

    Malbs
  • Re: Microsoft.Data.Odbc namespace not recognized.

    08-12-2003, 7:55 PM
    • Member
      55 point Member
    • myyee
    • Member since 03-07-2003, 8:09 AM
    • Posts 11
    Is this true, Malby? My development PC has .net v1.0 and my server has v1.1 redistributable. I'm using Microsoft.Data.Odbc all the time and I didn't see any error so far.
  • Re: Microsoft.Data.Odbc namespace not recognized.

    10-23-2003, 10:18 PM
    • Member
      185 point Member
    • Malby
    • Member since 06-26-2002, 6:53 PM
    • Posts 37
    Has anyone installed Microsoft.Data.Odbc assembly on your server?

    If they haven't, then I would imagine your code would throw FileNotFoundException instances.

  • Re: Microsoft.Data.Odbc namespace not recognized.

    10-26-2003, 2:38 PM
    • Member
      380 point Member
    • patber
    • Member since 08-21-2002, 11:33 PM
    • Vasteras, SWEDEN
    • Posts 76
    You have to put the Microsoft.Data.Odbc in the applications /bin folder.

    BUT! if you are using v1.1 just change Microsoft.Data.Odbc to, as already pointed, System.Data.Odbc

    cya,
    /PatrikB
    '## -- second place is the first looser --
Page 1 of 1 (6 items)