Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / February 2008

Tip: Looking for answers? Try searching our database.

Reading CSV into Dataset no column names

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tshad - 08 Feb 2008 23:55 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.