• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 991
  • Last Modified:

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;
            }
0
drmiller32
Asked:
drmiller32
  • 3
1 Solution
 
ellandrdCommented:
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?
0
 
drmiller32Author Commented:
Thnaks for the help.  Solved my problem.
0
 
ellandrdCommented:
;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now