troubleshooting Question

Problem with load data local infile and c#

Avatar of brian78wa
brian78wa asked on
.NET Programming
9 Comments1 Solution1451 ViewsLast Modified:
Im having a problem in c# .net express edition.

the error I get is "Object reference not set to an instance of an object."

heres the code
try {
        string sql = "load data local infile 'I:\\Internet Development\\WebVision\\Contents\\Reporting\\Source           Data\\Donor Vision\\Dailies\\20070520.tab' INTO TABLE azarel_data_donorvision.daily_donorvision";

                MySqlConnection conn = new MySqlConnection("data  source=source;DATABASE=database;User ID=user;PassWord=pw;");
                MySqlCommand comm = new MySqlCommand();
                conn.Open();
                comm.Connection = conn;
                comm.CommandText = sql;
                comm.ExecuteNonQuery();
            }
            catch (Exception ex) {
                throw ex;
            }

problem is that this only happens when I use the load data local infile statement
I can execute any other sql statement with this same code.
Any help fixing this would be appreciated.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros