🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to put NULL into TParameter?

#3617
From: Georgi Cholakov
Date: Fri, 19 Jul 2002 06:15
50 lines
2664 bytes
That error occurs when the type of wuery parameters is not specified. At
design time, click ont the query, select property Parameters from Object
Inspector and for each parameter set Value->Type - actual type for the
parameter. This property has not be NULL.

"Pedja" <pgrkovic@hotmail.com> wrote in message news:3d36d5f1_1@dnews...
> I tried that as well, only, instead of *(new Variant()), I put Variant().
> It's still the same problem, after I execute the query, I receive error
> message.
>
> Thanks.
> - Pedja.
>
> "Georgi Cholakov" <georgi.cholakov@mail.bg> wrote in message
> news:3d36a694_1@dnews...
> >
> > pQry->Parameters->ParamByName("DateRcvd")->Value = *(new Variant());
> >
> >
> > "Pedja" <pgrkovic@hotmail.com> wrote in message news:3d3677b5_2@dnews...
> > > Hello,
> > > I have a problem specifying TParameter::Value to be NULL. I'm running
> > > Borland C++ Builder 5 on Windows 2000 SP2.
> > > I think I've tried everything I could think of. I always get the
> message,
> > on
> > > ExecSQL:
> > > "Parameter object is improperly defined. Inconsistent or incomplete
> > > information was provided"
> > >
> > > ///////////////////////////////////////////////////////
> > >   Variant varDateRcvd;
> > >   varDateRcvd.ChangeType( varNull );
> > >   TParameterAttributes attrs;
> > >   attrs << paNullable;
> > >   pQry->Parameters->ParamByName("DateRcvd")->Attributes = attrs;
> > >   pQry->Parameters->ParamByName("DateRcvd")->Value = varDateRcvd;
> > >
> > >   pQry->ExecSQL();
> > > ///////////////////////////////////////////////////////
> > >
> > > Does anybody have any idea?
> > > TIA.
> > > - Pedja.
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID: <3d37af5d_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3d3677b5_2@dnews> <3d36a694_1@dnews> <3d36d5f1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,cc4e8136757a786e
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-18 23:48:16 PST
From: "Georgi Cholakov" <georgi.cholakov@mail.bg>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3d3677b5_2@dnews> <3d36a694_1@dnews> <3d36d5f1_1@dnews>
Subject: Re: How to put NULL into TParameter?
Date: Fri, 19 Jul 2002 09:15:54 +0300
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2532.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2532.0000
NNTP-Posting-Host: 80.72.72.182
Message-ID: <3d37af5d_2@dnews>
X-Trace: dnews 1027059549 80.72.72.182 (18 Jul 2002 23:19:09 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!dnews