I have some problem with the function GetOrdinal coming from the OleDb.DataReader. In my table, I have columns named with some space. I tried to call it with some [ ]:
Dim dr as System.Data.OleDb.OleDbDataReader
dr.GetOrdinal("[Nom truc]")
but it's telling me : "IndexOutOfRangeException"
I can't change the name of the field. The type of my base is accdb. In Microsoft Access, my query is working.
Sorry for my poor english, I'm an France girl :)
Thank you in advance!
`Dim c as System.Data.OleDb.OleDbCommand("Select [nom truc] from machin")
c.ExecuteReader()`
Without the brackets I have a syntax exception. So I tried to put the brackets in c and remove then from the dr.GetOrdinal but it return nothing. – MlleStrife Apr 05 '16 at 07:31