Hi all,
got a niggly little problem with my select statement and would appreciate some help pls..
I have a tableadapter which should return the output of this query..
Problem I have is that when the ProductName has a NULL ProductID, it is returning '1' instead of an empty string. This is leading users to think that the ProductID is in fact '1' instead of nothing.
My bit of code is as follows
Can anyone advise what I need to do to solve this?
Thanks
John
.NET 2.0, Visual Studio 2005, SQL Server 2005 Express
got a niggly little problem with my select statement and would appreciate some help pls..
I have a tableadapter which should return the output of this query..
Code:
Select ProductID
From tblProducts
Where ProductName = @Param1
Problem I have is that when the ProductName has a NULL ProductID, it is returning '1' instead of an empty string. This is leading users to think that the ProductID is in fact '1' instead of nothing.
My bit of code is as follows
Code:
TblProductsTableAdapter.spGetProductIDFromProdName(MyDataSet.tblProducts, ProductTextBox.Text)
Can anyone advise what I need to do to solve this?
Thanks
John
.NET 2.0, Visual Studio 2005, SQL Server 2005 Express