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......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

System.Data.DataRowView 3
DataBind 2
Define Columns 2
Problem creating "n" DataViews 2
select textbox.text 3
Sorting dataset Columns 4
sorting and paging 1
Select string as a column name in datatable? 3

Back
Top