Article View: borland.public.cppbuilder.database.ado
Article #4500Re: NULL fields
From: mafi
Date: Mon, 10 Dec 2001 14:48
Date: Mon, 10 Dec 2001 14:48
61 lines
2506 bytes
2506 bytes
What is the ADOQuery1->Parameters->Items[0]->Bound property ? don't see it
anywhere !
"Rick Golden" <GoldenRick@hotmail.com> a οΏ½crit dans le message news:
3c0690b7_1@dnews...
> this should work
>
> ADOQuery1->Parameters->Items[0]->Clear();
> ADOQuery1->Parameters->Items[0]->Bound = true;
>
>
>
> Jakob Petersen <Jakob@microhouse.dk> wrote in message
> news:3c065e0c$1_2@dnews...
> > Hi,
> >
> > The Clear() method on the parameter wont work with strings.
> > Use
> >
> > ADOQuery1->Parameters->Items[0]->Value = System::Null
> >
> > Instead which is the ONLY (XP) solution on ADO parameter clearing
> problems.
> >
> > Best Regards,
> >
> > Jakob Petersen
> > Microhouse
> >
> > "mafi" <mafi@multimania.com> skrev i en meddelelse
> news:3c0281a0_1@dnews...
> > > Hi !
> > > I'm using a TADOQuery to insert data into a table with the Parameters
> from
> > > another table.
> > > When I execute the query, if I got a NULL field I got a EOleException
> that
> > > says "Parameter object is improperly defined. Inconsistent or
incomplete
> > > information was provided"
> > >
> > > My code's like this:
> > > ADOQuery1->Parameters->Items[0]->Value =
> > > ADOQuery2->FieldByName("field1")->AsString;
> > > ...
> > >
> > > this : ADOQuery1->Parameters->Items[0]->Value = NULL;
> > > doesn't work as well, and the paNullable option of the Attributes
> property
> > > doesn't change anything.
> > >
> > > How can I insert data with NULL value ?
> > >
> > > Thanks
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID:
<3c14cbed_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3c0281a0_1@dnews> <3c065e0c$1_2@dnews> <3c0690b7_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,b547a45fc63b1283 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-12-10 07:09:32 PST Reply-To: "mafi" <mafi@multimania.com> From: "mafi" <mafi@multimania.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3c0281a0_1@dnews> <3c065e0c$1_2@dnews> <3c0690b7_1@dnews> Subject: Re: NULL fields Date: Mon, 10 Dec 2001 15:48:23 +0100 Lines: 63 Organization: gns X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 80.8.16.35 Message-ID: <3c14cbed_1@dnews> X-Trace: dnews 1007995885 80.8.16.35 (10 Dec 2001 06:51:25 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews