Article View: borland.public.cppbuilder.database.multi-tier
Article #213Re: Posting a record raises an exception wnen I enter a Zero Length String in a field
From: Robert Wheadon
Date: Tue, 29 Jun 2004 05:47
Date: Tue, 29 Jun 2004 05:47
30 lines
1835 bytes
1835 bytes
I have fixed this problem by checking if the field is empty and calling the TField::Clear() function to set the field to NULL. - Robert. "Robert Wheadon" <robert.wheadon@monitorbm.co.nz> wrote in message news:40d24794$1@newsgroups.borland.com... > Hello, > > I am making a program which reads and writes data from an Access 97 > database. There are some a couple of string fields that my program reads > and writes to. These fields update properly when I enter a non-zero length > string into them. When I enter a zero length string in one of them and call > TTable::Post(), I get a EDBEngineError exception. The error message reads: > > General SQL error. > Field 'Terminal.TermShortDescription' can't be a zero-length string. > Table > > Any ideas about why this is happening? > > Thanks, > > Robert Wheadon > >
Technical Details
Message-ID:
<40e1021b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40d24794$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: fcd2b,101d41f07aa51728 X-Google-Attributes: gidfcd2b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Robert Wheadon" <robert.wheadon@monitorbm.co.nz> Newsgroups: borland.public.cppbuilder.database.multi-tier References: <40d24794$1@newsgroups.borland.com> Subject: Re: Posting a record raises an exception wnen I enter a Zero Length String in a field Date: Tue, 29 Jun 2004 17:47:08 +1200 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4922.1500 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800 NNTP-Posting-Host: 203.167.201.38 Message-ID: <40e1021b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1088487963 203.167.201.38 (28 Jun 2004 22:46:03 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail