N
NuB
OK, here is the story, i have text boxes to allow the user enter information
for a search. I have my SQL that has LIKE in the where clause, in the query
builder the SQL works correctly, if nothing is entered all the data is
returned, if i enter in search criteria that data is returned. NOW, when i
try to do the same exact thing on my web form, it does not work. the grid
will only populate with data if I enter something in for search critia. AND
the grid will not work if I have more then 1 parameter in my where clause:
here is my SQL that works in the querybuilder
SELECT id, Officename, FirstName + ' ' + LastName AS FullName, Region,
FROM dbo.SalesTeam
WHERE (@FirstName IS NULL OR
FirstName LIKE '%' + @FirstName ) AND (@LastName IS
NULL OR
LastName LIKE '%' + @LastName ) AND (@Region IS NULL
OR Region LIKE '%' + @Region ) )
why will this work in query builder but not on the web form?
for a search. I have my SQL that has LIKE in the where clause, in the query
builder the SQL works correctly, if nothing is entered all the data is
returned, if i enter in search criteria that data is returned. NOW, when i
try to do the same exact thing on my web form, it does not work. the grid
will only populate with data if I enter something in for search critia. AND
the grid will not work if I have more then 1 parameter in my where clause:
here is my SQL that works in the querybuilder
SELECT id, Officename, FirstName + ' ' + LastName AS FullName, Region,
FROM dbo.SalesTeam
WHERE (@FirstName IS NULL OR
FirstName LIKE '%' + @FirstName ) AND (@LastName IS
NULL OR
LastName LIKE '%' + @LastName ) AND (@Region IS NULL
OR Region LIKE '%' + @Region ) )
why will this work in query builder but not on the web form?