Article View: borland.public.cppbuilder.database.ado
Article #5438Re: Zero-length strings
From: Lock Horsburgh
Date: Fri, 04 May 2001 09:50
Date: Fri, 04 May 2001 09:50
45 lines
1891 bytes
1891 bytes
"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:
<3af29986_1@dnews>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3af02729_2@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 05:10:04 PST From: "Lock Horsburgh" <lock@lhorsburgh.NO.RUBBISH.freeserve.co.uk> Newsgroups: borland.public.cppbuilder.database.ado References: <3af02729_2@dnews> Subject: Re: Zero-length strings Date: Fri, 4 May 2001 10:50:01 +0100 Lines: 47 Organization: Lohmacs Limited 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: 62.136.50.57 Message-ID: <3af29986_1@dnews> X-Trace: dnews 988977542 62.136.50.57 (4 May 2001 04:59:02 -0700) Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews