Menu

#15 problems installing, testing

open
nobody
None
5
2004-01-20
2004-01-20
Anonymous
No

austin at webconference dot com

I had a confusing time trying to get it installed. I used
the Windows binary install -- it installed the .chm
helpfile, but no dlls. I ended up getting the dlls out of
the zip file.

Then, I tried to build a test insert query with C#. I used
the sample from the help file, I get
System.TypeLoadException on the
myCommand.ExecuteNonQuery(); line.
Searching the net, I found that someone else did
myCommand.Connection.Open(); instead, so I tried
that, and I get a System.NullReferenceException on that
line.

Do I have a bad file?

Discussion

  • Richard Flapper

    Richard Flapper - 2004-01-20

    Logged In: YES
    user_id=956049

    I had the same problem you had and solved in the same way,
    copy the DLL's straight to the system32 subdir. After that I
    just referenced 'em in my C# project. After using the
    following class and binding it to a Datagrid everything
    worked like a charm!

    public sealed class CDataBase
    \{
    

    static CDataBase instance=null;
    static readonly object padlock = new object();
    static MySqlConnection conn;

        public CDataBase\(\)
        \{
            string connString = "server=localhost;database=db;user
    

    id=user;pwd=pwd";
    conn = new MySqlConnection(connString);
    }

        public DataSet GetDS \(\)
        \{
            MySqlDataAdapter da = new MySqlDataAdapter\("SELECT \* FROM
    

    tbl_structure", conn);

            DataSet ds = new DataSet \(\);
            da.Fill \(ds, "Structure"\);
            return \(ds\);
        \}
    

    public static CDataBase GetInstance()
    {
    if (instance==null)

    {
    lock (padlock)
    {
    if (instance==null)
    instance = new CDataBase();
    }
    }
    return instance;
    }
    }

     
  • Anonymous

    Anonymous - 2004-01-21

    Logged In: YES
    user_id=956598

    I have also had this problem and as a new user can you
    confirm that I should place the two dlls in System32 or should
    I use WINNT/Microsoft.Net/Framework/ ? I am assuming this
    directory is on my server. Also I use Visual Studio.Net on my
    client and I am unsure how to make a reference to the
    ByteFXData DLL so that MySqlConnection can be added to my
    toolbar.

     
  • Richard Flapper

    Richard Flapper - 2004-01-21

    Logged In: YES
    user_id=956049

    @abattersby:

    Yep, just copy the DLL's in whatever subdir you'd like. I
    guess they have to be somewhere in the systempath but I
    didn't check that. I just plainly copied 'em in the
    \winnt\system32 subdir (winxppro). Then - using VS.NET2003 -
    I referenced 'em in the Solution Explorer/References by
    using the Add References function/COM tab/Browse button.
    Select the "ByteFX.Data.dll" and ready. After that you
    ofcourse need to "use" the dll: using
    ByteFX.Data.MySqlClient; and you're done. The code I posted
    earlier returned a webpage with a filled datagrid. Really
    neat. Haven't checked the performance though but the fact
    that it worked was really neat.

     
  • Geoffrey Merck

    Geoffrey Merck - 2004-03-04

    Logged In: YES
    user_id=974844

    Did you set up your connection string properly?
    I get the same error when i forget to put the server in the
    connection string.

    Best Regards

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.