473,585 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Data.Dat aRowView 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.Te xt;
cn = new System.Data.Ole Db.OleDbConnect ion(con);
cn.Open();

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

//Query for getting the list of all tables from the schema , no restriction
dt = cn.GetOleDbSche maTable(OleDbSc hemaGuid.Tables , null);
//Display the tables in the tablesList
tablesList.Data Source = dt;
tablesList.Data Bind();
}

However, the datalist displays System.data.Dat aRowView 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 2769
Try
tablesList.Data Source = 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.Te xt;
cn = new System.Data.Ole Db.OleDbConnect ion(con);
cn.Open();

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

//Query for getting the list of all tables from the schema , no restriction
dt = cn.GetOleDbSche maTable(OleDbSc hemaGuid.Tables , null);
//Display the tables in the tablesList
tablesList.Data Source = dt;
tablesList.Data Bind();
}

However, the datalist displays System.data.Dat aRowView 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.ValueM ember and DataList.Displa yMember
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.Te xt;
cn = new System.Data.Ole Db.OleDbConnect ion(con);
cn.Open();

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

//Query for getting the list of all tables from the schema , no restriction
dt = cn.GetOleDbSche maTable(OleDbSc hemaGuid.Tables , null);
//Display the tables in the tablesList
tablesList.Data Source = dt;
tablesList.Data Bind();
}

However, the datalist displays System.data.Dat aRowView 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
1372
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 problem is that when trying to retrive a row from a childtable in a datagrid using either objects it still retrieves the parents data. I want the...
5
5161
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 System.Data to get it going. Why is that? Error Message: The type or namespace name 'DataRowView' could not be found (are you missing a using...
1
828
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
2205
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 sender, System.EventArgs e oleDbDataAdapter2.Fill( dataSet1) oleDbDataAdapter4.Fill( dataSet1)
0
1727
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 following code in aspx page <asp:Label ID="lblRenewExist" Visible="False" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "RENEW_EXIST")...
2
4601
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 problem. The oAllData function gets run on the initialization of the class. DataSet oAllData = new DataSet();
2
1585
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 the name 'ddYearOfImprv'.
3
10528
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 correct values, but when I refer to the selectedItem value using WaveItem = cboWaves.SelectedItem.ToString(); MessageBox.Show(WaveItem); I get...
4
5090
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 display in a listbox. Here's what I'm trying: dgrDataGrid.DataSource = dstData.Tables("Manufacturer") lstMake.datasource =...
0
7836
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8212
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5389
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3835
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.