Bugs in Oracle interface (8 and 10)

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Bugs in Oracle interface (8 and 10)

Postby Hans-Martin » Wed Jul 18, 2007 12:32 am

We've just switched to 7.5.1 and were eager to use the Oracle 10 interface because we have some need for LONG RAW / BLOB manipulation.

However, both the Oracle 8 and the Oracle 10 interfaces still have bugs regarding decimal numbers.

With Oracle 8, the bug is related to locale-specific representation. When reading numbers with decimal places, oracle uses the locale-specific decimal separator in the row buffer ($, in our case). However, the AbtOracle8DecimalField class uses a method (ScaledDecimal>>fromString:) which always expects a decimal point ($.)

This is our workaround (using the abrFromString: method which uses locale information):
Code: Select all
valueInRecord: aRecord parentOffset: anOffset
   " Return the contents of the character array beginning at anOffset as a
     platform String "

   ^((self scale) = 0)
      ifTrue: [(aRecord data abtCharArrayAt: anOffset + offset length:  self baseLength ) asNumber]
      ifFalse: [ScaledDecimal abrFromString: (aRecord data abtCharArrayAt: anOffset + offset length:   self baseLength ) ]


In the Oracle 10 interface, support for decimal digits is entirely non-existing! All numeric fields are mapped to AbtDatabaseLongIntegerField, which can not handle decimal digits at all.

This does not look well-tested at all... Is there a fix in the pipeline?

For the time being, we'll use the Oracle 8 interface with our fix.

Cheers,
Hans-Martin
Hans-Martin
 
Posts: 12
Joined: Tue Oct 17, 2006 3:44 am

Postby wembley » Wed Jul 18, 2007 10:20 am

Hans-Martin -

This problem has not been reported previously. I'll look into it and post back here tomorrow with some additional information.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby Ralf » Thu Jul 19, 2007 2:03 am

we have solve this problem in two steps, after connection we change the session parameters as follow

ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'
ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.,'
ALTER SESSION SET NLS_SORT = BINARY
ALTER SESSION SET NLS_COMP = BINARY

NLS_NUMERIC_CHARACTERS defined the decimal und the group separator. So we have no trouble with locale informations.

the second step is similar to Hans-Martin's, but we have make our own class and the method signed over, however we use Float with our convert method.

Unfortunately we have not send any anotation, because we solve this problem in 2003.
Ralf
 
Posts: 41
Joined: Thu Nov 16, 2006 4:18 am

Postby wembley » Thu Jul 19, 2007 5:44 am

Hans-Martin -

I have confirmed both these problems. I have opened case 30574 for them.

I have set 7.5.2 as the target for a fix.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby tc » Thu Jul 19, 2007 9:00 am

Hans-Martin,

Can you post a describe on the table in question and which column you are referring to?

Thanks.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Postby Hans-Martin » Fri Jul 20, 2007 3:00 am

Here's the describe of the table in question:
Code: Select all
SQL> desc kalkulation;
Name                                                              Null?    Typ
----------------------------------------------------------------- -------- ------------------------
ID                                                                NOT NULL NUMBER(38)
ZINSSATZ                                                                   NUMBER(10,6)
PASSIVZINSSATZ                                                             NUMBER(10,6)


The columns are ZINSSATZ and PASSIVZINSSATZ.

Of course, the problem does not appear if you're using a locale in which $. is the decimal point...

Cheers,
Hans-Martin
Hans-Martin
 
Posts: 12
Joined: Tue Oct 17, 2006 3:44 am

Bugs in Oracle interface (8 and 10)

Postby bpieber » Wed Aug 29, 2007 8:23 am

Are this bugs fixed in 7.5.2? I searched in the readme but did not find the case number. I ask because I have a project where I need to use Oracle 10g.

Cheers,
Bernhard
bpieber
 
Posts: 27
Joined: Sat Nov 04, 2006 4:00 am

Postby solveig » Wed Aug 29, 2007 8:51 am

Bernhard:

Case 30574 did not make it in to version 7.5.2.

Solveig Viste
Instantiations
VA Smalltalk Support
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am

Postby wembley » Wed Aug 29, 2007 10:01 pm

Bernard -

I am out of the country on a business trip right now (ESUG in Lugano), but I will have code for you (and others who are interested) shortly after I return next week. The code is written and I am testing during the coffee breaks :D
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby bpieber » Sat Sep 15, 2007 7:53 am

Are there any news regarding the fix?

By the way, the bug also exists in 7.0.

- Bernhard
bpieber
 
Posts: 27
Joined: Sat Nov 04, 2006 4:00 am

Postby wembley » Sat Sep 15, 2007 8:48 am

You can download the fix....

FTP site: http://www.instantiations.com
username: client1
password: upload4us

the file is downloads/case30574.dat
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Postby dmacqueen » Mon Jan 07, 2008 12:13 pm

wembley wrote:You can download the fix....

FTP site: http://www.instantiations.com
username: client1
password: upload4us

the file is downloads/case30574.dat


We just did a JAS/JWARS install at a site that runs Oracle 10 (we use 9 internally), and are getting ORA-01457* errors all over the place. Is that error related to the problem that is fixed here?

2) Where are the VAST Oracle 10 changes documented?

Thanks and Happy New Year to my fellow Smalltalkers.

Donald

*ORA-01457 converting column overflows decimal datatype
Cause: The converted form of the specified expression was too large for the specified type. The problem also occurs in COBOL programs when using COMP-3 in the picture clause, which is acceptable to the Pro*COBOL Precompiler and to COBOL but results in this error.
Action: Define a larger datatype or correct the data.
dmacqueen
[|]
 
Posts: 27
Joined: Fri Nov 02, 2007 3:40 pm

Postby tc » Tue Jan 08, 2008 9:04 pm

Hello,

Just to clarify, you installed with the Oracle 10 feature or Oracle 10 plus the patch? If you did not try the patch did you try that also?

Thanks.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Postby dmacqueen » Wed Jan 09, 2008 9:41 am

tc wrote:Hello,

Just to clarify, you installed with the Oracle 10 feature or Oracle 10 plus the patch? If you did not try the patch did you try that also?

Thanks.

--tc


Short answer is: yes, I think I have Oracle 10 installed.

Longer answer: I did not load the Oracle feature from the Transcript menu, because we do not use any of the Parts stuff. But from the config maps specifed in that feature, I have at least these apps loaded:

AbtDbmBaseApp
AbtDbmFieldsApp
AbtDbmKernelApp
AbtDbmOracle10BaseApp <<<<<<<<<<<<<<<< is this it?
AbtDbmOracleBaseApp
AbtRunDatabaseLogonApp
AbtRunDatabaseQueryPartApp
AbtRunStoredProcVisualsApp

I am in the process of standing up an Oracle 10 installation to see if I can reproduce the ORA-01457 problem. Once I reproduce it with the old (unpatched) code, I will try it again with John's fix.

Any other ideas in the meantime? Am I on the right track?

Thanks.

Donald

PS Is there any documentation on the improved support for Blobs?
dmacqueen
[|]
 
Posts: 27
Joined: Fri Nov 02, 2007 3:40 pm

Re: Bugs in Oracle interface (8 and 10)

Postby tc » Thu Jan 10, 2008 4:09 am

Hello,

I've never loaded it based on apps only but as you know, if something were missing then Envy would ask to load it. The AbtDbmOracleBase10App has the majority of the objects but it is subclassed off of the Oracle 8 classes.

There is documentation including BLOB examples. It should be in the Oracle readme but if you can not find it send an e-mail to support and it can be sent directly.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Next

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest