473,396 Members | 1,714 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.

using DataViews to get a filtered result set back

I'm a creating a dataView in the following manner:

VW_PRODMAIN = new DataView(ProdMain,"product_id='" + this.PRODUCT_ID +
"'" ,"product_id",DataViewRowState.CurrentRows);
when I do it in this manner I do not get any records in my DataView.

If I hard code the product_id in

VW_PRODMAIN = new DataView(ProdMain,"product_id='03feeadf-5c53-43ee-96ef-a88cd8b2d022'"
,"product_id",DataViewRowState.CurrentRows);

the DataView is populated with one record.

Does anyone know why the example on top will not work

I am using a String to define this.PRODUCT_ID

When I query ?VW_PRODMAIN.RowFilter in the Debugger I get the same
result for both the above examples.

I've tried converting the PRODUCT_ID into type Guid but this hasn't
worked either.
thanks

-- J.C. Klay
Nov 15 '05 #1
1 1219
What can I say? Compare the following two expressions and see where they
differ.

"product_id='" + this.PRODUCT_ID + "'"
"product_id='03feeadf-5c53-43ee-96ef-a88cd8b2d022'"

If there ain't a typo, then there's gotta be something different in these
expressions.

--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire

****************************************
"J. C. Clay" <bi********@yahoo.com> wrote in message
news:30**************************@posting.google.c om...
I'm a creating a dataView in the following manner:

VW_PRODMAIN = new DataView(ProdMain,"product_id='" + this.PRODUCT_ID +
"'" ,"product_id",DataViewRowState.CurrentRows);
when I do it in this manner I do not get any records in my DataView.

If I hard code the product_id in

VW_PRODMAIN = new DataView(ProdMain,"product_id='03feeadf-5c53-43ee-96ef-a88cd8b2d022'" ,"product_id",DataViewRowState.CurrentRows);

the DataView is populated with one record.

Does anyone know why the example on top will not work

I am using a String to define this.PRODUCT_ID

When I query ?VW_PRODMAIN.RowFilter in the Debugger I get the same
result for both the above examples.

I've tried converting the PRODUCT_ID into type Guid but this hasn't
worked either.
thanks

-- J.C. Klay

Nov 15 '05 #2

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

Similar topics

5
by: newtophp2000 | last post by:
I am having some difficulty in constructing outer joins. I have simplified what I need to do and have included sample SQL statements: create table tab_a (id int, descr varchar(10), qty int)...
2
by: Pablo | last post by:
Hi people, Necesito crear n dataviews en tiempo de ejecucion. I need to create "n" DataViews in runtime. I tried creating an array this way: Dim LDView As Array =...
6
by: GSteven | last post by:
(as formerly posted to microsoft.public.access.forms with no result) I've created a continuous form which is based on a straightforward table (ex - customers - 100 records). On the form there is...
4
by: Bo Diddly | last post by:
This is what I've done so far: I have a DataBase with: tblBook BookID... key Book... All the book titles of the Bible tblChapter ChapterID... key Chapter... chapter numbers (1 - 150)
1
by: Brian Henry | last post by:
I have a strange problem... I have a junction table that i need to filter based on a id, then take the filtered data and join it to a description table then show the data that was filtered in a...
7
by: Ken | last post by:
Hi All - I have a filtered GridView. This GridView has a check box in the first column. This check box is used to identify specific rows for delete operations. On the button click event I...
4
by: Bernie Hunt | last post by:
I currently have a datagrid that I'm feeding with a DataSet, which contains three tables. I would like to use a DataView to format the DataTables but I'm not sure how to go about this. Currently...
2
by: Steve JORDI | last post by:
Hi, I'm having a little trouble trying to update a page content when the user clicks a check box. Basically, I need to reload a page to update its content depending on that checkbox status. I...
3
by: =?Utf-8?B?cG1jZ3VpcmU=?= | last post by:
I have a dataset with 3 tables -- 2 Parent tables and 1 table that is a child table of both the parents. I create a dataview on the child table and set the rowfilter to a value which filters the...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.