BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Posting a record raises an exception wnen I enter a Zero Len

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Robert Wheadon
Guest





PostPosted: Fri Jun 18, 2004 1:39 am    Post subject: Posting a record raises an exception wnen I enter a Zero Len Reply with quote



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


Back to top
Robert Wheadon
Guest





PostPosted: Tue Jun 29, 2004 5:47 am    Post subject: Re: Posting a record raises an exception wnen I enter a Zero Reply with quote



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 (AT) monitorbm (DOT) co.nz> wrote

Quote:
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





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.