Article View: borland.public.cppbuilder.database.ado
Article #5358Re: Empty String Parameters are Illegal in ADO?
From: BM
Date: Sun, 10 Jun 2001 16:59
Date: Sun, 10 Jun 2001 16:59
25 lines
1971 bytes
1971 bytes
First of all I'm more familiar to Delphi so I apologies for any discrepancies. Can't tell you why these things happen but from our experience if you have a NULL string you must set the parameter to NULL (i.e check its a blank string- if it is set Parameter.Value = NULL) otherwise you see this error. Another advisable thing to do is initialise all parameters to NULL i.e. before any parameters are set is loop through them and set their value to NULL. BM Arnie Mauer <arnie@marketexpert.com> wrote in message news:3b20ed67_2@dnews... > In a parameterized INSERT statement in a TADOQuery, when setting > q->Parameters->ParamByName( "foo" )->Value = ""; > will cause q->ExecSQL() to throw an excpetion of: "Parameter object is > improperly defined. Inconsistent or incomplete information > was provided." Same goes for a NULL AnsiString. > > The TParameter Value == NULL and Length == 0. The DataType > has been properly set to ftString after the assignment. What's > wrong with a NULL string? > >
Technical Details
Message-ID:
<3b23a7eb_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-was.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnewsReferences:
<3b20ed67_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,bf8db65ec424c3c9 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-06-10 10:07:22 PST From: "BM" <m02x7z00@cwcom.net> Newsgroups: borland.public.cppbuilder.database.ado References: <3b20ed67_2@dnews> Subject: Re: Empty String Parameters are Illegal in ADO? Date: Sun, 10 Jun 2001 17:59:09 +0100 Lines: 27 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: 172.170.177.114 Message-ID: <3b23a7eb_2@dnews> X-Trace: dnews 992192491 172.170.177.114 (10 Jun 2001 10:01:31 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-was.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnews