🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #5845

Re: DBE Error Trapping

#5845
From: Gary
Date: Thu, 01 Feb 2001 04:25
43 lines
2169 bytes
Sorry, I ment to say DBEngine Errors.
The error I need to trap is caused by typing a value not in the lookup
table.

EX:  Vendor Table has entries for these vendors:

ACME, KODAK, UPS

in a Transaction Table the user enters a vendor name of "AME"
Which was "ACME" misspelled.
This will throw an exception due to unique value constraints.
That is what I need to trap. People have told me to code it in the post()
event, but I don't know just how to code it.


Mark Cashman <mcashman@temporaldoorway.com> wrote in message
news:3A777A98.4C5BD0A0@temporaldoorway.com...
> Hi, Gary!
>
> You should ask about BDE issues in
> borland.public.cppbuilder.database.desktop
>
> However,
>
>     if (!Table->Locate(SomeFieldName,SomeFieldValue,TLocateOptions())
>     {
>         // handle the error.
>
> sounds like what you need.
>
> Not finding a record is not an error under all circumstances and doesn't
> throw an exception.
>
> ------
> Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
> http://www.temporaldoorway.com
> - Original digital art, writing, music and more -
> C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
> (Join us!)
> http://www.temporaldoorway.com/programming/index.htm
> ------
>
>
Technical Details
Message-ID: <3a78c934_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!news.bnb-lp.com!bornews.borland.com!dnews!209.86.52.178
References: <3a774bf0$1_1@dnews> <3A777A98.4C5BD0A0@temporaldoorway.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,e408e6c0d20ed148
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-01-31 18:27:49 PST
Reply-To: "Gary" <gcdesroches@mindspring.com>
From: "Gary" <gcdesroches@mindspring.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3a774bf0$1_1@dnews> <3A777A98.4C5BD0A0@temporaldoorway.com>
Subject: Re: DBE Error Trapping
Date: Wed, 31 Jan 2001 20:25:22 -0800
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 209.86.52.178
Message-ID: <3a78c934_2@dnews>
X-Trace: 31 Jan 2001 18:25:56 -0800, 209.86.52.178
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!news.bnb-lp.com!bornews.borland.com!dnews!209.86.52.178