I have an issue with a OLE Text file that I am reading into a table then building sql statements from...
the problem is that any field that contains a ' character is getting messed up...
Here is my connection string:
mODBCcn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + config.AppSettings.Settings["ImportLoc"].Value.ToString() + ";Extended Properties=\"text;HDR=Yes;FMT=Delimited\"");
now, I build a schema file that looks like ths:
ODBCda = new OleDbDataAdapter("Select * from " + msrcFile, mODBCcn);
mODBCdt.TableName = "import";
mODBCdt.DefaultView.AllowNew = false;
any row that has a field with ' in it..gets wacked..in other words if the columns are:
mfgr model descr list cost
and ' is in the description, the rest of the row has null values.
Thanks for the help.