Thread View: borland.public.cppbuilder.database.ado
3 messages
3 total messages
Started by Gary
Wed, 31 Jan 2001 01:18
DBE Error Trapping
Author: Gary
Date: Wed, 31 Jan 2001 01:18
Date: Wed, 31 Jan 2001 01:18
6 lines
1192 bytes
1192 bytes
Could someone give me a code snippet or some form of Builder 4.00 source code that will demo how to trap a BDE Exception from within my apps? The error of most interest is caused when you are using a lookup to prevent duplicate records and the user tries to enter a value that is not in the lookup table.
Re: DBE Error Trapping
Author: Mark Cashman
Date: Wed, 31 Jan 2001 02:38
Date: Wed, 31 Jan 2001 02:38
24 lines
1558 bytes
1558 bytes
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
------
Re: DBE Error Trapping
Author: Gary
Date: Thu, 01 Feb 2001 04:25
Date: Thu, 01 Feb 2001 04:25
43 lines
2169 bytes
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
> ------
>
>
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