mysql problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dirk Reske

    #1

    mysql problem

    Hello,

    I'm using the bytefx.data library to connect to a mysql server:

    string ConnectionStrin g = "Server=localho st;Database=tes t;User
    Id=Freak;passwo rd=freak;";
    IDbConnection dbConn;
    dbConn = new ByteFX.Data.MyS qlClient.MySqlC onnection(Conne ctionString);
    dbConn.Open();

    I get an NullReference exception when I call the Open() member?
    does anyone know why?

    thx


  • Alvin Bruney

    #2
    Re: mysql problem

    It should be

    UID=userid;PWD= pwd";

    instead of User[color=blue]
    > Id=Freak;passwo rd=freak;";[/color]


    "Dirk Reske" <_Freak-2k@gmx.net> wrote in message
    news:OBEL3CPkDH A.688@TK2MSFTNG P10.phx.gbl...[color=blue]
    > Hello,
    >
    > I'm using the bytefx.data library to connect to a mysql server:
    >
    > string ConnectionStrin g = "Server=localho st;Database=tes t;User
    > Id=Freak;passwo rd=freak;";
    > IDbConnection dbConn;
    > dbConn = new ByteFX.Data.MyS qlClient.MySqlC onnection(Conne ctionString);
    > dbConn.Open();
    >
    > I get an NullReference exception when I call the Open() member?
    > does anyone know why?
    >
    > thx
    >
    >[/color]


    Comment

    • Sunny

      #3
      Re: mysql problem

      In article <OBEL3CPkDHA.68 8@TK2MSFTNGP10. phx.gbl>, _Freak-2k@gmx.net
      says...[color=blue]
      > Hello,
      >
      > I'm using the bytefx.data library to connect to a mysql server:
      >
      > string ConnectionStrin g = "Server=localho st;Database=tes t;User
      > Id=Freak;passwo rd=freak;";
      > IDbConnection dbConn;
      > dbConn = new ByteFX.Data.MyS qlClient.MySqlC onnection(Conne ctionString);
      > dbConn.Open();
      >
      > I get an NullReference exception when I call the Open() member?
      > does anyone know why?
      >
      > thx
      >
      >
      >[/color]
      What kind of exception? If that solution is based on MyODBC, there are
      some problems with older versions of MySQL.
      Or you may try the native .net classes, provided by MySQL:
      http://www.mysql.com/articles/dotnet/index.html

      Sunny

      Comment

      Working...