Link to home
Start Free TrialLog in
Avatar of drmiller32
drmiller32

asked on

MySQLDriverCS

I have written a program that seems to work properly on my office computer I connect to the data base Insert, Delete and update without a problem.  But when I installed on lab computers it appears that the connectins fails.  I kept getting errors saying that there was an excption error and the program needed to close.  I tride updateing all the 1.1 and 2.0 net.Frame componets.  No success.  I then installed visual studio 2005 on the lab computer and I get an error at the command line com.open().  I do not know what exception is beeing thrown. But I can't step beyond that point.  My two office computers work great.  Only when I install on a lab computer.
I'm assuming this may be a driver issue but not forsure im using MySQLDriverCS 3.51.  The code is listed below.

thanks
     Dave.


                MySQLConnection con;
                con = new MySQLConnection(new MySQLConnectionString
                          ("hundredacrewood", "WTA", "WTA", "123456").AsString);

                con.Open();

                sql =
                    "INSERT INTO main_userslogedin ("
                        + "UAN, "
                        + "ULN, "
                        + "RD, "
                        + "CN, "
                        + "ULAT) "
                        + "Values ('" + UAN + "', '" + UN+ "', '" + RN + "', '"
                        + WS  + "', '" + ULAT + "');";

                MySQLCommand cmd = new MySQLCommand(sql, con);
                cmd.ExecuteNonQuery();
                con.Close();
             }
            catch (MySQLDriverCS.MySQLException ex)
            {
                RTB_SQL.Text = ex.Message.ToString()+ RTB_SQL.Text;
            }
Avatar of ellandrd
ellandrd
Flag of Ireland image

what language are you programming in?

is may not have anything to do with MYSQL.  I suggest try getting a simple connection working first to take MYSQl out of the equation - at least that way, we know MYSQL isnt the problem.

There might be a number of reason to why you get these errors.  These can include access rights to MYSQL on lab machine... god only knows.

can you provide more info to help us solve your problem?
ASKER CERTIFIED SOLUTION
Avatar of ellandrd
ellandrd
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of drmiller32
drmiller32

ASKER

Thnaks for the help.  Solved my problem.