🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages Started by Robert Wheadon Fri, 18 Jun 2004 01:39
Posting a record raises an exception wnen I enter a Zero Length String in a field
#212
Author: Robert Wheadon
Date: Fri, 18 Jun 2004 01:39
17 lines
1458 bytes
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
Re: Posting a record raises an exception wnen I enter a Zero Length String in a field
#213
Author: Robert Wheadon
Date: Tue, 29 Jun 2004 05:47
30 lines
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
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads