473,396 Members | 1,879 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,396 software developers and data experts.

System.Data.DataRowView problem

I am trying to fill a datalist with table names from an Oracle database. The
program works fine using the following code:
private void GetTables()
{
// open a database connection
string con = connectLabel.Text;
cn = new System.Data.OleDb.OleDbConnection(con);
cn.Open();

//Declare a DataTable Object
System.Data.DataTable dt ;

//Query for getting the list of all tables from the schema , no restriction
dt = cn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
//Display the tables in the tablesList
tablesList.DataSource = dt;
tablesList.DataBind();
}

However, the datalist displays System.data.DataRowView in the datalist when
I run the program. What do I need to change in the above code to fix this
problem.

Thanks,

Dave

Nov 16 '05 #1
2 2758
Try
tablesList.DataSource = dt.Rows();

"kscdavefl" wrote:
I am trying to fill a datalist with table names from an Oracle database. The
program works fine using the following code:
private void GetTables()
{
// open a database connection
string con = connectLabel.Text;
cn = new System.Data.OleDb.OleDbConnection(con);
cn.Open();

//Declare a DataTable Object
System.Data.DataTable dt ;

//Query for getting the list of all tables from the schema , no restriction
dt = cn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
//Display the tables in the tablesList
tablesList.DataSource = dt;
tablesList.DataBind();
}

However, the datalist displays System.data.DataRowView in the datalist when
I run the program. What do I need to change in the above code to fix this
problem.

Thanks,

Dave

Nov 16 '05 #2
Are you setting the DataList.ValueMember and DataList.DisplayMember
properties? If you don't do that, I think it defaults to the Type name
of whatever object is assigned to the list.

kscdavefl wrote:
I am trying to fill a datalist with table names from an Oracle database. The
program works fine using the following code:
private void GetTables()
{
// open a database connection
string con = connectLabel.Text;
cn = new System.Data.OleDb.OleDbConnection(con);
cn.Open();

//Declare a DataTable Object
System.Data.DataTable dt ;

//Query for getting the list of all tables from the schema , no restriction
dt = cn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
//Display the tables in the tablesList
tablesList.DataSource = dt;
tablesList.DataBind();
}

However, the datalist displays System.data.DataRowView in the datalist when
I run the program. What do I need to change in the above code to fix this
problem.

Thanks,

Dave

Nov 16 '05 #3

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

Similar topics

0
by: lanky_tx | last post by:
Hi All, I am trying to acess the rows within a child table of a windows form datagrid. I have tried using the CurrencyManager & BindingManagerBase to get the data but doesn't work. The...
5
by: karim | last post by:
I am getting the error below when I try to use DataRowView in my aspx page. I am using the System.Data in my code behind. I even tried importing system.Data in the aspx. I have to qualify it with...
1
by: Arjen | last post by:
Hello, Does somebody haves a solution for this? Thanks! Line 74: if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {
2
by: etropic | last post by:
I am trying to bind two tables to two different list boxes Ther tables are working as I use them on another page wth no problems The code is as follows... private void Page_Load(object...
0
by: MS | last post by:
I am very new to asp.net. Please help me in resolving the error: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name RENEW_EXIST. I get the above error with the...
2
by: Grigs | last post by:
I have a C# Web Service that some of the methods (ones that return integers) work and some do not (the ones that return a DataView. Here is some code in the WebService that is giving me the...
2
by: arupasna | last post by:
I am working with datagrid while adding new row in Datagrid getting following problem pls help me out of this problem DataBinding: 'System.Data.DataRowView' does not contain a property with...
3
by: Jerry | last post by:
Hi I have a combo box that is populated by an ole db connection to a ms access table (Valuewave). The column that is used in the table is called waves. The combo box is populated with the...
4
by: Arch Stanton | last post by:
I'm trying to bind data in a dataset (obtained from an Access DB) to a listbox in ASP.net. I know my dataset is being created properly because it displays fine in a datagrid, but I can't get it to...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.