Search code examples
c#odbctext-driver

How to get a row by column name


I am trying to get a column value by name instead of by ordinal. Here is the code I already have:

SELECT trim([Workitem Id]) as [Workitem Id1] from 1.csv

above is the query

rrm.id = oDR["Workitem Id"] == DBNull.Value ? string.Empty : oDR["Workitem Id"];

When I run this query I get too few parameters expected error.


Solution

  • Your column name is actually Workitem Id1 is it not?