How to Open a CSV with Jet OLEDB and attain Row or Table Lock?
I am currently trying to figure out how to open a CSV file as a DB so that I can read it into a DataTable. This part isn't hard:

            string cStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
                    + Path.GetPathRoot(fullFileName) + ";Extended Properties=\"Text;HDR=Yes;FMT=CSVDelimited\";";
            OleDbConnection dbConn = new OleDbConnection(cStr);
            dbConn.Open();
            OleDbCommand dbCmd = new OleDbCommand("SELECT * FROM " + Path.GetFileName(fullFileName));
            OleDbDataAdapter da = new OleDbDataAdapter(dbCmd);
            DataTable dt = new DataTable();
            da.Fill(dt);


What I want to make sure of is that while I have the CSV file open, that I have a Read/Write LOCK on the Table (CSV file), so that any other application that comes along and tries to read/write to this file has to wait its turn.

Does this happen automatically? If not, what do I need to do to make sure this does happen?

Btw, I'm working in C#/.NET 2.0, if that makes any difference...
How to Open a CSV with Jet OLEDB and attain Row or Table Lock?
===

I am currently trying to figure out how to open a CSV file as a DB so that I can read it into a DataTable. This part isn't hard:

            string cStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
                    + Path.GetPathRoot(fullFileName) + ";Extended Properties=\"Text;HDR=Yes;FMT=CSVDelimited\";";
            OleDbConnection dbConn = new OleDbConnection(cStr);
            dbConn.Open();
            OleDbCommand dbCmd = new OleDbCommand("SELECT * FROM " + Path.GetFileName(fullFileName));
            OleDbDataAdapter da = new OleDbDataAdapter(dbCmd);
            DataTable dt = new DataTable();
            da.Fill(dt);


What I want to make sure of is that while I have the CSV file open, that I have a Read/Write LOCK on the Table (CSV file), so that any other application that comes along and tries to read/write to this file has to wait its turn.

Does this happen automatically? If not, what do I need to do to make sure this does happen?

Btw, I'm working in C#/.NET 2.0, if that makes any difference...