Skip to content
Advertisement

Convert SQL Integer into c# string for combobox (Access Database)

The following code gives me an IndexOutOfRange error. ‘Baujahr’ is an integer column in my access-database.

Here the reader:

And the whole code of this procedure:

Advertisement

Answer

You are only including the Typ column in your result set. You will have to include Baujahr in your SELECT statement if you want to access it in your DataReader.

i.e:

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