Found the problem! the problem was that it was creating a space memory for the "array" and when It tried to access to the 31 it hadn't enough memory...Now I'm changing it so that It works with any size array.
Code:
                    While dr.Read()
                        _lft._listcampoFichero.Add(New CampoFicheroTexto(_lft.tipoRegistro, contadorCampo))
                        _lft.tabla = dr("tabla")
                        If (dr("dependencia") IsNot DBNull.Value) Then _lft.dependencia = dr("dependencia")
                        If (dr("Salvar_Historia") IsNot DBNull.Value) Then _lft.SalvarHistoria = CBool(dr("Salvar_Historia"))
                        If (dr("campo") IsNot DBNull.Value) Then _lft.ListCampoFichero(contadorCampo).NombreCampoTabla = dr("campo")
                        If (dr("longitud") IsNot DBNull.Value) Then _lft.ListCampoFichero(contadorCampo).Longitud = CShort(dr("longitud"))
                        If (dr("formato") IsNot DBNull.Value) Then _lft.ListCampoFichero(contadorCampo).Formato = dr("formato")
                        If (dr("n_decimales") IsNot DBNull.Value) Then _lft.ListCampoFichero(contadorCampo).nroDecimales = CShort(dr("n_decimales"))
                        contadorCampo += 1
                    End While