Board index » delphi » Unspecified error

Unspecified error


2004-01-07 06:00:40 PM
delphi260
Hi,
I use D5 with ADO and Microsoft for Oracle provider ver. 2.575.
When I execute stored procedure (process delete row from table) and
error occure I do not have proper error information - there is only
'Unspecified error'.
When I use OraOleDB as an provider the error message is proper i.e.
'... foreign key constraint violation ...'. Can anyone help?
Thanks , Peter
 
 

Re:Unspecified error

On 7 Jan 2004 02:00:40 -0800, XXXX@XXXXX.COM (Peter) writes:
Quote
Hi,
I use D5 with ADO and Microsoft for Oracle provider ver. 2.575.
When I execute stored procedure (process delete row from table) and
error occure I do not have proper error information - there is only
'Unspecified error'.
When I use OraOleDB as an provider the error message is proper i.e.
'... foreign key constraint violation ...'. Can anyone help?
Thanks , Peter
If you are getting Foreign key violation in a delete that means you
are attempting to delete a record that is being used in another table
e.g.
Orders Table
OrderNo CustomerNo .....
1 1
Customers Table
CustomerNo CustomerName
1 Terry's Tackle Shop
Attaempting to delete customer 1 while there is an Order for Customer
1 will cause the dbms to raise the error.
 

Re:Unspecified error

Tony J Hopkinson <XXXX@XXXXX.COM>writes news:<XXXX@XXXXX.COM>...
Quote
On 7 Jan 2004 02:00:40 -0800, XXXX@XXXXX.COM (Peter) writes:

>Hi,
>I use D5 with ADO and Microsoft for Oracle provider ver. 2.575.
>When I execute stored procedure (process delete row from table) and
>error occure I do not have proper error information - there is only
>'Unspecified error'.
>When I use OraOleDB as an provider the error message is proper i.e.
>'... foreign key constraint violation ...'. Can anyone help?
>Thanks , Peter

If you are getting Foreign key violation in a delete that means you
are attempting to delete a record that is being used in another table
e.g.

Orders Table
OrderNo CustomerNo .....
1 1

Customers Table
CustomerNo CustomerName
1 Terry's Tackle Shop

Attaempting to delete customer 1 while there is an Order for Customer
1 will cause the dbms to raise the error.
Tony thanks,
but I want to known why in first case there is such strange error
message - message which say nothing about why error occures. that is my
question, not why
relational algebra works how it works :)
 

Re:Unspecified error

On 8 Jan 2004 23:44:24 -0800, XXXX@XXXXX.COM (Peter) writes:
Quote
Tony J Hopkinson <XXXX@XXXXX.COM>writes news:<XXXX@XXXXX.COM>...
>On 7 Jan 2004 02:00:40 -0800, XXXX@XXXXX.COM (Peter) writes:
>
>>Hi,
>>I use D5 with ADO and Microsoft for Oracle provider ver. 2.575.
>>When I execute stored procedure (process delete row from table) and
>>error occure I do not have proper error information - there is only
>>'Unspecified error'.
>>When I use OraOleDB as an provider the error message is proper i.e.
>>'... foreign key constraint violation ...'. Can anyone help?
>>Thanks , Peter
>
>If you are getting Foreign key violation in a delete that means you
>are attempting to delete a record that is being used in another table
>e.g.
>
>Orders Table
>OrderNo CustomerNo .....
>1 1
>
>Customers Table
>CustomerNo CustomerName
>1 Terry's Tackle Shop
>
>Attaempting to delete customer 1 while there is an Order for Customer
>1 will cause the dbms to raise the error.

Tony thanks,
but I want to known why in first case there is such strange error
message - message which say nothing about why error occures. that is my
question, not why
relational algebra works how it works :)
Oh because ADO and Oracle don't go together that well, vendors
twisting the arms of their customers again.
 

Re:Unspecified error

Hi, I am working in an application developed with Delphi 5 that uses ADO Components. It must run over win2k with sql server 7 (msde). The problem is that some times when our application starts it connect to the database but all insert, update or delete statements fail with an error: "Unspecified error".
Any idea?
Thanks in advance
 

Re:Unspecified error

All,
Please ignore last post I had a news server castatrophe.
I get the following exception "Unspecified Error" during occasional use of
my MDB database using ADO. The error gets trapped here:
{$IFDEF MSWINDOWS}
procedure SafeCallError(ErrorCode: Integer; ErrorAddr: Pointer);
var
ErrorInfo: IErrorInfo;
Source, Description, HelpFile: WideString;
HelpContext: Longint;
begin
HelpContext := 0;
if GetErrorInfo(0, ErrorInfo) = S_OK then
begin
ErrorInfo.GetSource(Source);
ErrorInfo.GetDescription(Description);
ErrorInfo.GetHelpFile(HelpFile);
ErrorInfo.GetHelpContext(HelpContext);
end;
raise EOleException.Create(Description, ErrorCode, Source,
HelpFile, HelpContext) at ErrorAddr;
end;
{$ENDIF}
What might cause this?
TIA,
John Borchers
 

Re:Unspecified error

All,
Why might one get an Unspecified Error EOleException during an ADO (ODBC
MDB) connection?
Thanks,
John
 

Re:Unspecified error

I just got that error yesterday during a very long
procedure on one Celeron 1,7Mhz.
It was ADO & MDB involved in an operation. There
wasn't any complicated code - but was processing a
lot of records (400,000) and the program chrashed maybe
on 30% completed.
On the other (more powerful) machine, the procedure
succeded.
--
Best regards,
Vladimir Stefanovic
"John Borchers" <XXXX@XXXXX.COM>writes
Quote
All,

Why might one get an Unspecified Error EOleException during an ADO (ODBC
MDB) connection?

Thanks,

John

 

Re:Unspecified error

Vladimir:
This seems a connection problem to MDB with ADO
This solves it:
try
{
ADOConnection1->Connected=true;
}
catch(EOleException &E)
{
ADOConnection1->Connected=false;
Sleep(5000);
ADOConnection1->Connected=true;
}
try
{
ADOQuery1->Active=true;
}
catch(Exception &E)
{
ShowMessage("Unexpected exception during this procedure "+E.Message);
}
John
"Vladimir Stefanovic" <XXXX@XXXXX.COM>writes
Quote
I just got that error yesterday during a very long
procedure on one Celeron 1,7Mhz.

It was ADO & MDB involved in an operation. There
wasn't any complicated code - but was processing a
lot of records (400,000) and the program chrashed maybe
on 30% completed.

On the other (more powerful) machine, the procedure
succeded.



--
Best regards,
Vladimir Stefanovic
"John Borchers" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>All,
>
>Why might one get an Unspecified Error EOleException during an ADO (ODBC
>MDB) connection?
>
>Thanks,
>
>John
>


 

Re:Unspecified error

Vladimir:
This seems to happen to me on connection. How about you?
I can solve it by doing this:
try
{
ADOConnection1->Connected=true;
}
catch(EOleException &E)
{
ADOConnection1->Connected=false;
Sleep(5000);
ADOConnection1->Connected=true;
}
try
{
ADOQuery1->Active=true;
}
catch(Exception &E)
{
ShowMessage("Unexpected exception during work"+E.Message);
}
If my application does connection, disconnection, connection, then the
exception gets thrown.
John
"Vladimir Stefanovic" <XXXX@XXXXX.COM>writes
Quote
I just got that error yesterday during a very long
procedure on one Celeron 1,7Mhz.

It was ADO & MDB involved in an operation. There
wasn't any complicated code - but was processing a
lot of records (400,000) and the program chrashed maybe
on 30% completed.

On the other (more powerful) machine, the procedure
succeded.



--
Best regards,
Vladimir Stefanovic
"John Borchers" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>All,
>
>Why might one get an Unspecified Error EOleException during an ADO (ODBC
>MDB) connection?
>
>Thanks,
>
>John
>