Can't Find Column

  • Thread starter Thread starter André Almeida Maldonado
  • Start date Start date
A

André Almeida Maldonado

When I use this code:

Dim dtsDataSet As DataSet = New DataSet("Dados")
Dim dttUsuarios As DataTable = dtsDataSet.Tables.Add("Usuarios")
Dim dtvUsuarios As DataView = New DataView(dtsDataSet.Tables("Usuarios"),
"", "UsuaNome", DataViewRowState.CurrentRows)

The compiler say that the column "UsuaNome" cannot be find, but it exists in
the database... Why it happens?????


Thank's...
 
André,

You haven't actually populated the dataset or datatable in this code, so
it's no surprise that the column is not found. Have you left out some code
in your example? If so, you might want to consider using debug
functionality to get a list of the tables and columns in the dataset at the
point where the exception is raised. You will probably find that a lack of
table mappings has caused your dataset to be populated in an unexpected
manner.

HTH,
Nicole
 
Sorry, but I never made it.... What is the error in the code? How can I
populate the dataset / datatable???

Thank's......
 
Back
Top