Skip to content
Advertisement

OLEDB reading CSV file returns first column only

I’m trying to read a pipe separated text file. First lines are

Below is the LINQpad script i’m using. It runs perfectly, but does return values from the first colum only.

This returns the first column only.

I tried switching to column names SELECT BewerberID, Druck FROM Historie.CSV but get an error stating “At least one parameter has no value”. (BTW: SELECT BewerberID FROM Historie.CSV does work and returns the same as *)

What do i have to do to get all columns back?

Advertisement

Answer

Create a file named schema.ini in the same folder as Historie.CSV (in this case C:). The file should have the following contents:

Then try rerunning the code.

Some links:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement