ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Insert integer variable into ORACLE number

Post new topic  Reply to topic
 Insert integer variable into ORACLE number « View previous topic :: View next topic » 
Author Message
csongebalazs
PostPosted: Tue Jan 24, 2006 5:59 am    Post subject: Insert integer variable into ORACLE number Reply with quote

Voyager

Joined: 30 Jan 2004
Posts: 78

Hi,

I'm using WBIMB 5.0 CSD6 and Oracle 9iR2 on Win2003 server.

When I tried to insert the 3210887500 value into an oracle table, the result was -1084079796 ?!

The insert was the following:

Code:

            INSERT INTO Database.KTEK.EP_EGYENLEGEK
               (ID,
               FOSZAMLA,
               ALSZAMLA,
               FK_MT566_ID,
               MODOSITO,
               MODOSITAS,
               EGYENLEG,
               KELL_E)
            VALUES
               (Environment.KTEKV.EP_EGYENLEGEK_ID,
               foszamla,
               alszamla,
               Environment.KTEKV.Kapcsolodo_IONAPLO_rekord.EGYEB_ID,
               node,
               CURRENT_TIMESTAMP,
               CAST(temp AS INTEGER),
               CASE WHEN kell_e THEN 'I' ELSE 'N' END);



where the value of the temp variable was 3210887500.

The problematic field is the EGYENLEG in this table. Its datatype is NUMBER (with default precision and scale).

I made a user trace during the insert, and it said, the result of the CAST was 3210887500.

I updated a record by hand (TOAD), and I could wrote 3210887500 into that filed.

So ORACLE can handle this number, the broker can cast this into integer correctly, but the result is deadly. Maybe, there can be some problem between the broker and the ORACLE, and the ODBC driver convert 3210887500 into -1084079796?!

/I am not an ODBC or ORACLE expert. So maybe there is a very simple solution for this madness./

Please, help me!

Regards
Balazs Csonge
Back to top
View user's profile Send private message
dipankar
PostPosted: Tue Jan 24, 2006 10:32 pm    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

What is your driver name?

Don't forget to check Enable SQLDescribeParam while setting your System DSN.

While setting your system DSN (Start-->setting -->control panel-->Administrative tools-->Data sources(ODBC)-->System DSN--->add-->driver Name---> advance tab), you have to check Enable SQLDescribeParam.

Driver name should be MQseries DataDirect Technologies X.10.32-BIT Oracle (X=4 or 5)

Try this and post the result
_________________
Regards
Back to top
View user's profile Send private message
csongebalazs
PostPosted: Wed Jan 25, 2006 12:44 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2004
Posts: 78

It is MQSeries DataDirect 4.10. 32-BIT Oracle8. The Oracle8 part of it is a bit strange, because we use Oracle9, but this driver was installed with the WBIMB.

Anyway the following check boxes are checked:
- Enable SQLDecribeParam
- Application Using Threads
- Use Current Schema for SQLProcedures
- Catalog Functions Include Synonyms
- Optimize Log Performance
- Describe at Prepare
- Enable Scrollable Cursors

There is a small difference from the "BIG BOOK", we didn't create the workaround variable for ODBC in the registry.
Back to top
View user's profile Send private message
dipankar
PostPosted: Wed Jan 25, 2006 1:21 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Set WorkArounds to 536870912 in the ODBC.INI

Also see the link

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ah14442_.htm

Oracle8 part is really a strange matter. I do not know why it comes. I never see this.

Anyway are all other data being inserted into the table properly?
_________________
Regards
Back to top
View user's profile Send private message
csongebalazs
PostPosted: Wed Jan 25, 2006 2:25 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2004
Posts: 78

Hi,

You made a link to the WMB v6 documentation , but I know, the method is same in case of WBIMB.


Some weeks ago we had an another serious problem on the customer side, when this variable was set. The broker lost a connection from its customer database, and was not able to recconect it. The error message was something like this:
TNS service name not available.

After a broker or a system restart a problem couldn't be eliminated.
When we changed the oracle naming method from ONAMES to TNSNAMES or back the problem was temporary disabled, but not solved. When the naming method was changed to TNSNAMES and this WorkArounds variable was deleted, the problem eliminated finally.

I know, it sounds very strangely.

So, therefore we will not set this variable.

But I am curious to know what is the purpose of this WorkArounds variable?

Anyway, I changed the insert on the WBIMB side, and I set up the problematic filed with string value. The oracle can convert automatically this string into number.
In this way, I can by-pass the problem, but I think something bad in the ODBC side.

A broker must handle integer number upto +9223372036854775807 (by its documentation). The 3210887500 more more less than this value. I think the ODBC can handle only 2^31 values, and the resulted -1084079796 value proves this idea.

Regards,
Balazs
Back to top
View user's profile Send private message
dipankar
PostPosted: Wed Jan 25, 2006 2:48 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

I have got this

Quote:
WorkArounds=536870912. This option allows for re-binding parameters
after calling SQLExecute for prepared statements.


Don't ask me for details. See the link please

http://media.datadirect.com/download/docs/odbc/readme/95ntread.htm
_________________
Regards
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Insert integer variable into ORACLE number
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.