Click here to Skip to main content
15,887,980 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# and SQL Server :: Find Most Common Via Junction Table Pin
Łukasz Nowakowski27-Jul-11 23:28
Łukasz Nowakowski27-Jul-11 23:28 
QuestionHow to close a file? Pin
Member 806979527-Jul-11 8:09
Member 806979527-Jul-11 8:09 
AnswerRe: How to close a file? Pin
Ennis Ray Lynch, Jr.27-Jul-11 9:07
Ennis Ray Lynch, Jr.27-Jul-11 9:07 
AnswerRe: How to close a file? Pin
PIEBALDconsult27-Jul-11 14:44
mvePIEBALDconsult27-Jul-11 14:44 
GeneralRe: How to close a file? Pin
Member 806979529-Jul-11 4:29
Member 806979529-Jul-11 4:29 
GeneralRe: How to close a file? Pin
PIEBALDconsult30-Jul-11 5:18
mvePIEBALDconsult30-Jul-11 5:18 
AnswerRe: How to close a file? Pin
jjdacl28-Jul-11 16:46
jjdacl28-Jul-11 16:46 
QuestionDbDataReader: Matching fields to order or occurrence? Pin
Goalie3527-Jul-11 4:14
Goalie3527-Jul-11 4:14 
I have to read an excel file and ensure the columns are in their correct order (the file is created manually and sometimes, columns are inserted in the incorrect order). I'm reading the file via microsoft jet oledb 4.0. I then insert the values into a DbDataReader.

I now have to check to see if each column is in it's propper position. So, as of now, I have the following to start with (The data reader field names are based on the column header names of the excel file):
using (DbDataReader dr = command.ExecuteReader())
{
     while (dr.Read())
     {
          String col1 = dr["OrderId"];
     }
}


But my question is, how do I ensure dr["OrderId"] is the 1st field within the dbDataReader?

Thanks
AnswerRe: DbDataReader: Matching fields to order or occurrence? Pin
dasblinkenlight27-Jul-11 4:26
dasblinkenlight27-Jul-11 4:26 
AnswerRe: DbDataReader: Matching fields to order or occurrence? Pin
Ennis Ray Lynch, Jr.27-Jul-11 5:41
Ennis Ray Lynch, Jr.27-Jul-11 5:41 
AnswerRe: DbDataReader: Matching fields to order or occurrence? Pin
PIEBALDconsult27-Jul-11 14:45
mvePIEBALDconsult27-Jul-11 14:45 
AnswerRe: DbDataReader: Matching fields to order or occurrence? Pin
Eddy Vluggen28-Jul-11 9:49
professionalEddy Vluggen28-Jul-11 9:49 
GeneralRe: DbDataReader: Matching fields to order or occurrence? Pin
PIEBALDconsult28-Jul-11 13:57
mvePIEBALDconsult28-Jul-11 13:57 
Questiondeveloping program Pin
albertodiprima27-Jul-11 4:08
albertodiprima27-Jul-11 4:08 
AnswerRe: developing program Pin
Richard MacCutchan27-Jul-11 4:12
mveRichard MacCutchan27-Jul-11 4:12 
GeneralRe: developing program Pin
albertodiprima27-Jul-11 4:17
albertodiprima27-Jul-11 4:17 
GeneralRe: developing program Pin
Blue_Boy27-Jul-11 4:37
Blue_Boy27-Jul-11 4:37 
QuestionLoading of pictures and (un)covering them Pin
nstk27-Jul-11 0:02
nstk27-Jul-11 0:02 
AnswerRe: Loading of pictures and (un)covering them [modified] Pin
GlobX27-Jul-11 0:48
GlobX27-Jul-11 0:48 
GeneralRe: Loading of pictures and (un)covering them Pin
nstk27-Jul-11 21:36
nstk27-Jul-11 21:36 
GeneralRe: Loading of pictures and (un)covering them Pin
GuyThiebaut27-Jul-11 23:38
professionalGuyThiebaut27-Jul-11 23:38 
QuestionCatch Database events (Oracle 10) Pin
V.26-Jul-11 22:26
professionalV.26-Jul-11 22:26 
AnswerRe: Catch Database events (Oracle 10) Pin
Dave Kreskowiak27-Jul-11 1:24
mveDave Kreskowiak27-Jul-11 1:24 
GeneralRe: Catch Database events (Oracle 10) Pin
V.27-Jul-11 2:10
professionalV.27-Jul-11 2:10 
AnswerRe: Catch Database events (Oracle 10) Pin
jschell27-Jul-11 12:35
jschell27-Jul-11 12:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.