Re: .net VS 05 HELL!
- From: "NuB" <me@xxxxxx>
- Date: Fri, 20 Jan 2006 14:09:45 -0500
tried that, I have it working with passing 1 parameter but anymore then
that, nothing.
I'm thinking of just coding this in the code behind and screw this inline
model
"ME" <trash.trash@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9MSdnVXZ1MvTrEzeRVn-ug@xxxxxxxxxxxxxx
> Perhaps the control is passing NULL and not DBNULL. You might try
> assigning a default value to the parameter in the stored procedure or
> query.
>
> Just my 2 cents.
>
> Thanks,
>
> Matt
>
> "TJ Nelson" <TJNelson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:10E6A206-D054-4323-8C5D-A03380B56DB6@xxxxxxxxxxxxxxxx
>>I don't have an answer on why it would be working in one place and not the
>> other, but have you tried putting your SQL into a stored procedure and
>> then
>> trying to use that? Just something to use for troubleshooting.
>>
>>
>>
>> "NuB" wrote:
>>
>>> 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?
>>>
>>>
>>>
>
>
.
- Follow-Ups:
- Re: .net VS 05 HELL!
- From: ME
- Re: .net VS 05 HELL!
- References:
- .net VS 05 HELL!
- From: NuB
- Re: .net VS 05 HELL!
- From: ME
- .net VS 05 HELL!
- Prev by Date: Re: Serializing
- Next by Date: Response.Redirect
- Previous by thread: Re: .net VS 05 HELL!
- Next by thread: Re: .net VS 05 HELL!
- Index(es):
Relevant Pages
|