Article View: borland.public.cppbuilder.database.ado
Article #5439Re: Zero-length strings
From: Curtis Reimer
Date: Fri, 04 May 2001 12:55
Date: Fri, 04 May 2001 12:55
55 lines
2226 bytes
2226 bytes
Thanks, Problem solved. Curt "Lock Horsburgh" <lock@lhorsburgh.NO.RUBBISH.freeserve.co.uk> wrote in message news:3af29986_1@dnews... > > "Curtis Reimer" <curtisr@lvcontrol.mb.ca> wrote in message > news:3af02729_2@dnews... > > Hello, > > > > When posting records to the database, I get the following error when we > try > > to put an empty string into a field. > > > > Field 'tblLocation.Description' cannot be a zero-length string > > > > The interesting portion of the code is essentially > > > > tblLocation->Edit(); > > tblLocationDescription->AsString = description; > > tblLocation->Post(); > > > > where > > - tblLocationDescription is a TWideStringField > > - description is an empty AnsiString > > > > Why can't a string be set to zero-length? The field is not part of the > key, > > required, etc. Does it have something to do with variants being used > within > > the code? > > > > Details you might like to know: > > > > OS : WinNT SP6a > > MDAC: V2.6 > > C++ Builder V5 Professional, Update Pack 1 > > ADO Express, including update > > DB: Access 2000 > > > > Thank You, > > > > Curt > > > > > > > > Is there a NOT NULL constraint on that column? > > Lock. > >
Technical Details
Message-ID:
<3af2a64b$1_1@dnews>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!209.81.14.120!feeder.via.net!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3af02729_2@dnews> <3af29986_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,93d84733dfbac4d9 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-05-04 06:10:03 PST Reply-To: "Curtis Reimer" <curtisr@lvcontrol.mb.ca> From: "Curtis Reimer" <curtisr@lvcontrol.mb.ca> Newsgroups: borland.public.cppbuilder.database.ado References: <3af02729_2@dnews> <3af29986_1@dnews> Subject: Re: Zero-length strings Date: Fri, 4 May 2001 07:55:33 -0500 Lines: 57 Organization: L.V. Control Mfg. Ltd X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 205.200.67.18 Message-ID: <3af2a64b$1_1@dnews> X-Trace: dnews 988980811 205.200.67.18 (4 May 2001 05:53:31 -0700) Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!209.81.14.120!feeder.via.net!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews