Article View: borland.public.cppbuilder.database.ado
Article #3609Re: How to put NULL into TParameter?
From: Georgi Cholakov
Date: Thu, 18 Jul 2002 11:27
Date: Thu, 18 Jul 2002 11:27
30 lines
1911 bytes
1911 bytes
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:
<3d36a694_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsReferences:
<3d3677b5_2@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 04:32:29 PST From: "Georgi Cholakov" <georgi.cholakov@mail.bg> Newsgroups: borland.public.cppbuilder.database.ado References: <3d3677b5_2@dnews> Subject: Re: How to put NULL into TParameter? Date: Thu, 18 Jul 2002 14:27:34 +0300 Lines: 32 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.174 Message-ID: <3d36a694_1@dnews> X-Trace: dnews 1026991764 80.72.72.174 (18 Jul 2002 04:29:24 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews