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

Find NULL in DataView

I have a table ("checkout") that I'm tracking equipment checkout
transaction. It has columns: checkoutid (key), checkedbyid,
checkedtoid, dateout, datein and inventoryid. When the user scans an
equipment barcode (Entry), I'm trying to check if that equipment was
previously checked out, but not properly checked back in by looking up
the inventoryid and then searching for a blank datein field. I've
declared the dataview with:

Dim dvChk As New Data.DataView(InventoryDS.Tables("checkout"), "",
"inventoryid, datein", DataViewRowState.CurrentRows)

dvChkRow is an integer to represent the row in the dataview that
matches my search criteria below:

dvChkRow = dvChk.Find(New Object() {Entry.Trim, System.DBNull.Value})

The problem is, when I'm testing my code and I have a good dateout /
datein for a particular inventoryid and I fault-insert a bad one
(dateout, blank datein), dvChkRow always returns the first row in the
dataview, regardless of the presense or absence of a datein value.

I think it's something with my Find method, but I'm not exaclty sure
how to search for a null.

Regards,
Michael Banks
Aug 18 '08 #1
0 927

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

Similar topics

2
by: mdb | last post by:
I have a datagrid that is bound to a DataView, and it shows events and the times that event started ("StartTime") and stopped ("EndTime"). If the event has started but hasn't finished, then...
4
by: Aaron Smith | last post by:
Dim dv As DataView = New DataView(FacilitiesDS1.Facilities, "", "ID ASC", DataViewRowState.CurrentRows) Dim iPos As Integer = dv.Find(dr.Item("ID")) Me.BindingContext(FacilitiesDS1,...
3
by: Thirsty Traveler | last post by:
I have a gridview where the datasource is bound after a selection. The result of doing this is that sorting and paging do not work. I was given a sample of how to resolve this, however my attempt...
5
by: John | last post by:
I just cannot manage to perform a SELECT query with NULL parameter... My CATEGORY table does have one row where TCATEGORYPARENTID is null (real DB null value). TCATEGORYID and TCATEGORYPARENTID...
2
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I need to locate a row (or see if it exists) in a table contained in a dataset. The DataView.Find method seems to work OK for one criteria but I need to use 2 criterias. Is there...
3
by: Edwin Smith | last post by:
Hello: I have the following code which works on a DataGridView binding source: private void textBox1_TextChanged(object sender, EventArgs e) { this.pATIENTSBindingSource.Position =...
5
by: luqman | last post by:
How can I check if dv recordcount isNull ? Best Regards, Luqman Function showRecords(byVal ItemID as Int16) as String Dim SqlArg as New DataSourceSelectArguments Dim dv As New...
3
by: Nitinkcv | last post by:
Hi, While trying to run my app im getting the error Could not find a part of the path "c:\inetpub\wwwroot\Do not Delete\dbglobal.config". I checked and found that there is no Important_Do not...
2
by: cmrchs | last post by:
Hello, I have a GridView and an objectDataSource <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" AllowPaging="True" /> <asp:ObjectDataSource...
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: 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
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
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,...
0
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...
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.