Hi all,
I am getting my data from an unstructed text file, parse through it and get only the data I need. I am dumping the data into a text file, after that, I am executing a bulk insert to insert data to db. But I'm having problem with UNC in bulk insert.
So I thought of just inserting it directly to db after getting the data line after line from the unstructed textfile.
Just like:
so instead of doing this, I would:Code:while ((input = inputf.ReadLine()) != null) { sw.WriteLine(mydate.Trim() + "," + myuser.Trim() + "," + stat + "," + DateTime.Now.ToString()); }
My question is: Is this efficient? I am usually inserting 500 records in one process. Will this pose speed problems too?Code:while ((input = inputf.ReadLine()) != null) { //assuming this is correct insert procedure. insert to table values (mydate.Trim() + "," + myuser.Trim() + "," + stat + "," + DateTime.Now.ToString());}
Thanks very much for any help


Reply With Quote