🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4564

Re: NULL fields

#4564
From: Rick Golden
Date: Fri, 30 Nov 2001 19:49
52 lines
2161 bytes
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: <3c0690b7_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3c0281a0_1@dnews> <3c065e0c$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,b547a45fc63b1283
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-11-29 12:00:52 PST
Reply-To: "Rick Golden" <GoldenRick@hotmail.com>
From: "Rick Golden" <GoldenRick@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3c0281a0_1@dnews> <3c065e0c$1_2@dnews>
Subject: Re: NULL fields
Date: Fri, 30 Nov 2001 14:49:43 -0500
Lines: 54
Organization: Gold
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 198.168.250.105
Message-ID: <3c0690b7_1@dnews>
X-Trace: dnews 1007063223 198.168.250.105 (29 Nov 2001 11:47:03 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews