Connection Oracle 11g and TD 3.0

forum.connectivity (2000-2005) & forum.td.connectivity (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Connection Oracle 11g and TD 3.0

Post by NewsgroupServer » 17 Dec 2009, 23:18

 Posted by:  J Bomberger 

I can connect a TD 3.0 app to Oracle 11g fine. I can pull data from the 11g
database. However if I try and insert data insto a column that is smaller,
I receive no error at all and it does not insert the data.

If I use a 9i client I have no problem, I receive feedback that data is to
large for the column.

Has anybody come across this? Is there a workaround? No telling if there
are other errors ignored.

Thanks,

Joseph Bomberger

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Connection Oracle 11g and TD 3.0

Post by NewsgroupServer » 20 Dec 2009, 20:09

 Posted by:  Stefan Misch 

Yes this is because Oracle changed the handling of this error and you
get a new and better error msg. The problem is, that Gupta's Oracle
router is not able to handle the new error.

IIRC there is a workarround as you can configure Oracle to behave like
an older version. I need to dig this up, when I'm in the office
tomorrow. However we don't use this workarround, as it means that other
applications that handle oracle errors correctly cannot make use of the
new (and IMHO better error msg, as it gives you details about the
offending column and the length).

Stefan

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Connection Oracle 11g and TD 3.0

Post by NewsgroupServer » 21 Dec 2009, 15:13

 Posted by:  Jim McNamara 

Call SqlGetModifiedRows( hSql, n_modified )

If n_modified > 0 something was updated.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Connection Oracle 11g and TD 3.0

Post by NewsgroupServer » 04 Jan 2010, 16:28

 Posted by:  Thomas Eberle 

Hi Joseph

There is a simple workaround for this problem.
You can create a database-trigger to simulate the old error-no.

So when the error occurs the trigger will replace the new error-no with the
old one that gupta understands and so your application works fine.

Trigger must look like this:

CREATE OR REPLACE TRIGGER "OWNER"."TRG_ERROR_1401"
AFTER SERVERERROR
ON DATABASE
DECLARE
VALUE_TOO_LARGE EXCEPTION;
PRAGMA EXCEPTION_INIT (VALUE_TOO_LARGE, -1401);
BEGIN
IF dbms_standard.server_error(1) = 12899 THEN
RAISE VALUE_TOO_LARGE;
END IF;
END;

Pls adapt the owner (schema) and the name of the trigger to your needs.

Regards
Thomas

Return to “td.connectivity”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests