Re: TADOQuery and assign null value to the parameter
- From: "vverdenga" <vverdenga@xxxxxxxxxxxxxx>
- Date: Fri, 24 Mar 2006 09:19:15 +0200
TADOQuery does not support the Clear method ... it can be used only when we
use data access components ...
any other ideas?
Ï "Brian Hollister" <bhollisterATfuturaintlDOTcom> Ýãñáøå óôï ìÞíõìá
news:4422f8fd$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Use the Clear method of TParam like so;
MhtrvoPagivn.repYlikaYpallhloi.Parameters[0].Clear;
hth,
brian
--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"vverdenga" <vverdenga@xxxxxxxxxxxxxx> wrote in message
news:4422e87f@xxxxxxxxxxxxxxxxxxxxxxxxx
hi i have the following query:YPALLHLOI.NAME,
select yliko.SERIAL_NUMBER,
yliko.PERIGRAFH,yliko.CODE_YPALLHLOY,yliko.CODE_KATASTASHS,
KATASTASH_YLIKOY.PERIGRAFH, ypallhloi.codeMhtrvoPagivn.repYlikaYpallhloi.Parameters[0].Value:=FrmYlika_ypallhlo.ComboY
from yliko, ypallhloi, katastash_ylikoy
where (yliko.CODE_YPALLHLOY = ypallhloi.code)
and (yliko.CODE_KATASTASHS = KATASTASH_YLIKOY.code)
and (YPALLHLOI.code= :codeypal or :codeypal is null)
order by ypallhloi.name
the only thing i want to do is to assing values to the parameter using
the
folling code:
if ComboYpallhlos.KeyValue<>null then
pallhlos.KeyValue
elseso
MhtrvoPagivn.repYlikaYpallhloi.Parameters[0].Value:=null;
my problem is that when my parameter don't have value i get no result...
i am asking how can i clear my parameterYPALLHLOI.NAME,
when i delete the parameter from the sql i get the right results
select yliko.SERIAL_NUMBER,
yliko.PERIGRAFH,yliko.CODE_YPALLHLOY,yliko.CODE_KATASTASHS,
KATASTASH_YLIKOY.PERIGRAFH, ypallhloi.code
from yliko, ypallhloi, katastash_ylikoy
where (yliko.CODE_YPALLHLOY = ypallhloi.code)
and (yliko.CODE_KATASTASHS = KATASTASH_YLIKOY.code)
order by ypallhloi.name
thank's in advance
.
- References:
- TADOQuery and assign null value to the parameter
- From: vverdenga
- Re: TADOQuery and assign null value to the parameter
- From: Brian Hollister
- TADOQuery and assign null value to the parameter
- Prev by Date: Re: Connection String in SQL Server 2005 giving errors
- Next by Date: Use ADO on Active Directory
- Previous by thread: Re: TADOQuery and assign null value to the parameter
- Next by thread: Re: TADOQuery and assign null value to the parameter
- Index(es):
Relevant Pages
|