I have a csv file that I am reading into my dataset. But I want to ignore
any rows that have nothing in the 3rd column - something like:
da = new OleDbDataAdapter("SELECT * FROM " +
Path.GetFileName(strFile) + "WHERE F3 is not null",csvConnection);
or Where F3 = ''
where F3 would be some type of column number. The problem is I don't have
any column names as I am reading this from a csv text file.
How would I do this?
Thanks,
Tom
christery@gmail.com - 09 Feb 2008 08:33 GMT
and where does F3 come from? I'd name columns to have a name I put
there...
look at http://msdn2.microsoft.com/en-us/library/ms709353.aspx for
additional info on schema.ini
//CY Who stole chr$(12)?
sloan - 09 Feb 2008 15:03 GMT
If you don't have columns , you define them in a seperate file..that resides
in the SAME directory.
http://www.google.com/search?hl=en&q=IDataReader+text++%22HDR%3DNo%22+ini
I think its called "schema.ini", but can't remember exactly.
But there is a way...hopefully that will help.
> I have a csv file that I am reading into my dataset. But I want to ignore
> any rows that have nothing in the 3rd column - something like:
[quoted text clipped - 12 lines]
>
> Tom
christery@gmail.com - 11 Feb 2008 23:39 GMT
interesting point sloan, why of why didnt I think of that...
//CY