SQLScholar
Programmer
Hey all
I have this code exert
(bits have been cut out for sanity!)
Now after this while if i do a Reader.item(0) i get data from the second row. If i do Reader.getname(0) i get the header. What i effectively want is the header to be in the dataset. I thought this is what HDR=No would give me.
Help JET SQL is doing my nut
Dan
----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss
Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
I have this code exert
Code:
connectionString = "Provider =Microsoft.Jet.OLEDB.4.0; Data Source =""" + Dts.Variables("Filename").Value.ToString + """; Extended Properties =""Excel 8.0;HDR=No;IMEX=0""; "
conn.ConnectionString = connectionString
conn.Open()
cmd.Connection = conn
cmd.CommandText = "SELECT * from [" + Sheet + "]"
Reader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Try
Dim RowNumber As Integer = 1
While (Reader.Read)
Now after this while if i do a Reader.item(0) i get data from the second row. If i do Reader.getname(0) i get the header. What i effectively want is the header to be in the dataset. I thought this is what HDR=No would give me.
Help JET SQL is doing my nut
Dan
----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss
Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------