473,383 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Can't Find Column

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...
Jul 21 '05 #1
3 3684
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
"André Almeida Maldonado" <de***@bol.com.br> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
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...

Jul 21 '05 #2

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

Thank's......
"Nicole Calinoiu" <ni*****@somewhere.net> escreveu na mensagem
news:O%****************@TK2MSFTNGP12.phx.gbl...
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
"André Almeida Maldonado" <de***@bol.com.br> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
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...


Jul 21 '05 #3
André,

The usual manner for populating a DataSet or DataTable from a database is to
use the Fill method of a DataAdapter object. If you're not familiar with
this method, you can find documentation at the following URL:
http://msdn.microsoft.com/library/en...sfilltopic.asp.

HTH,
Nicole
"André Almeida Maldonado" <de***@bol.com.br> wrote in message
news:Ow**************@tk2msftngp13.phx.gbl...

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

Thank's......
"Nicole Calinoiu" <ni*****@somewhere.net> escreveu na mensagem
news:O%****************@TK2MSFTNGP12.phx.gbl...
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
"André Almeida Maldonado" <de***@bol.com.br> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
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...



Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Praveen | last post by:
In the ISPF editor I am using, for a particullar PO Dataset I am getting the result of FIND statement narrowed down to the colums 48-56. i.e. if I give "FIND 'TO' ALL", the result I am getting as...
1
by: easyrider | last post by:
I am working on a school project via an online class and ran into head scratching problem trying to figure out how to tell MS access what I want it to do. Real world scenario: A building has a...
2
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of...
6
by: Dan V. | last post by:
I would like to create a 2D string list (2D ArrayList ???). I would like to pass in a table or query as a parameter and have both columns transform into a 2D ArrayList. When I sort the one...
4
by: Steve B. | last post by:
How do I find the column (index) number at runtime of a particular DataGrid column if I know the column header string //somthing like the following int x = datagrid.column;
1
by: Ersin Gençtürk | last post by:
I have 2 typed data tables inherited from the same dataset schema One called : table A with an identity column x column x is constrained to be unique. Other one is : table B with an identity...
3
by: André Almeida Maldonado | last post by:
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...
6
by: A.M | last post by:
Hi I use a code similar to this to retrieve data from Oracle database: import cx_Oracle
31
by: Sarita | last post by:
Hello, this might sound stupid, but I got a really nice homepage template which unfortunately is a 3-Column Fixed Width CSS format. Now I don't have any content for the right column and would...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.