|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Insert integer variable into ORACLE number |
« View previous topic :: View next topic » |
Author |
Message
|
csongebalazs |
Posted: Tue Jan 24, 2006 5:59 am Post subject: Insert integer variable into ORACLE number |
|
|
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 |
|
 |
dipankar |
Posted: Tue Jan 24, 2006 10:32 pm Post subject: |
|
|
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 |
|
 |
csongebalazs |
Posted: Wed Jan 25, 2006 12:44 am Post subject: |
|
|
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 |
|
 |
dipankar |
Posted: Wed Jan 25, 2006 1:21 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
|
Back to top |
|
 |
csongebalazs |
Posted: Wed Jan 25, 2006 2:25 am Post subject: |
|
|
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 |
|
 |
dipankar |
Posted: Wed Jan 25, 2006 2:48 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|