By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,201 Members | 956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,201 IT Pros & Developers. It's quick & easy.

Reading CSV into Dataset no column names

P: n/a
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
Feb 9 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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)?
Feb 9 '08 #2

P: n/a

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...DR%3DNo%22+ini

I think its called "schema.ini", but can't remember exactly.

But there is a way...hopefully that will help.

"tshad" <ts***@dslextreme.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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


Feb 9 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.