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

DataView's ToTable

Ben
Hi all,

i just discovered the ToTable() method on a view and its ability to
load only distinct values. nice!

....but i'm having issues with it returning duplicates. it seems to
work in some cases but not all. when i did a DISTINCT on the column
i'm trying to pull via SQL it only showed one entry (meaning there's
no a hidden space or something like that).

anyone seen such an issue?
//here i'm filtering my view

dvItemsInStock.RowFilter = "ProfArea=" + MyDB.GetSQLString(sProfArea)
+ " AND Domain=" + MyDB.GetSQLString(sDomain);

//attempting to create a table of DISTINCT Family, but it's returning
two rows with the same Family value for some reason...

DataTable dtFamilies = dvItemsInStock.ToTable(true, "Family");
Sep 17 '08 #1
0 1517

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

Similar topics

2
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit...
36
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a...
5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
1
by: Daniel | last post by:
HI all, Does anyone know how to transfer the filtered dataview to another new dataview? for example, in dvA has 3 rows. After filter by condition, it has 2 rows being displayed. The dvB set...
16
by: Sam | last post by:
Hi, As I loop through a dataview's records, I delete datarow based on a condition. However I don't want to commit those deletions until the loop ends. With a datatable, i would just set...
1
by: Li Pang | last post by:
Hi, I created a dataview for filtering data from a datatable, I want to create a new dataset from this dataview. Anybody can give a simple solution? Thanks in advance
3
by: Chris | last post by:
I want to get from a dataview to an XPathDocument. I have tried the following: System.IO.MemoryStream memstream = new System.IO.MemoryStream() ; DataView.ToTable().WriteXml(memstream);
3
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have a dataview with a single column in it which contains duplicates. What is the best way to eliminate the duplicates rows so i can turn this column into the primary key? thanks,...
0
by: Pravin Pujari | last post by:
Hi All, I am using .net framework 1.1 and c#. I have one problem regarding dataview. I have one dataview to which sorting may be applied or may not be applied. I have one UI component where I...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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,...

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.