🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Q: How to put NULL into TParameter?

#3607
From: Pedja
Date: Thu, 18 Jul 2002 08:09
22 lines
1621 bytes
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: <3d3677b5_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,cc4e8136757a786e,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-18 01:14:40 PST
From: "Pedja" <pgrkovic@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Q: How to put NULL into TParameter?
Date: Thu, 18 Jul 2002 11:09:25 +0300
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 212.31.100.26
Message-ID: <3d3677b5_2@dnews>
X-Trace: dnews 1026979765 212.31.100.26 (18 Jul 2002 01:09:25 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews