G
Guest
I have a SQL 2000 table named IMSRejects with the fields:
IMSRejects.ProductDescription
IMSRejects.VendorName
IMSRejects.CatalogNumber
IMSRejects.ProductIMS2Desc
IMSRejects.CMA8Desc
Many of the ProductIMS2Desc and CMA8Desc values are Null. I have an ASP.NET
2.0 web page which populates a datagrid with this data. I also have text
boxes on my web page so users can filter the datagrid based on keywords. The
problem I'm having is that the SELECT statement that populates the datagrid
does no handle null values for ProductIMS2Desc and CMA8Desc. Here's the
statement:
Dim _SqlAccounts As String = "Select * FROM IMSRejects WHERE " & _
"IMSRejects.ProductDescription LIKE '%" & strProductName & "%' AND "
& _
"IMSRejects.VendorName LIKE '%" & strVendorName & "%' AND " & _
"IMSRejects.CatalogNumber LIKE '%" & strCatalogName & "%' AND " & _
"IMSRejects.ProductIMS2Desc LIKE '%" & strFranchiseName & "%' AND "
& _
"IMSRejects.CMA8Desc LIKE '%" & strProductLineName & "%' " & _
"ORDER BY VendorName ASC, ProductIMS2Desc ASC, CMA8Desc ASC"
I'd like to default to True a checkbox on my web page named cbShowAll and
add an IF clause that will show all records including those where
ProductIMS2Desc and CMA8Desc contain NULL values. When the checkbox is FALSE,
I'd like the grid to only show records ProductIMS2Desc and CMA8Desc don't
have NULL values.
THANKS!!
IMSRejects.ProductDescription
IMSRejects.VendorName
IMSRejects.CatalogNumber
IMSRejects.ProductIMS2Desc
IMSRejects.CMA8Desc
Many of the ProductIMS2Desc and CMA8Desc values are Null. I have an ASP.NET
2.0 web page which populates a datagrid with this data. I also have text
boxes on my web page so users can filter the datagrid based on keywords. The
problem I'm having is that the SELECT statement that populates the datagrid
does no handle null values for ProductIMS2Desc and CMA8Desc. Here's the
statement:
Dim _SqlAccounts As String = "Select * FROM IMSRejects WHERE " & _
"IMSRejects.ProductDescription LIKE '%" & strProductName & "%' AND "
& _
"IMSRejects.VendorName LIKE '%" & strVendorName & "%' AND " & _
"IMSRejects.CatalogNumber LIKE '%" & strCatalogName & "%' AND " & _
"IMSRejects.ProductIMS2Desc LIKE '%" & strFranchiseName & "%' AND "
& _
"IMSRejects.CMA8Desc LIKE '%" & strProductLineName & "%' " & _
"ORDER BY VendorName ASC, ProductIMS2Desc ASC, CMA8Desc ASC"
I'd like to default to True a checkbox on my web page named cbShowAll and
add an IF clause that will show all records including those where
ProductIMS2Desc and CMA8Desc contain NULL values. When the checkbox is FALSE,
I'd like the grid to only show records ProductIMS2Desc and CMA8Desc don't
have NULL values.
THANKS!!