Author |
Message
|
dipankar |
Posted: Tue Apr 12, 2005 4:31 am Post subject: problem in insert statement in ORACLE |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi All,
Please see the following ESQL code-
DECLARE CH_UUID CHAR;
SET CH_UUID = UUIDASCHAR;
INSERT INTO Database.INTERFACE_LOGGING (INT_LOG_ID) VALUES (CH_UUID);While using the above code, I am getting an ODBC Error :'Driver does not support this function'.
I am on WMQI 2.1 CSD 8 and Oracle 8i with MQSeries DataDirect Technologies 4.10 32-BIT Oracle as the Driver.
But the same code is working absolutely fine in DB2.
Please look at the above code. Here I am using a variable CH_UUID.
But if I give the value of variable explicitly, then it is working in ORACLE. Then my insert statement looks like this-
INSERT INTO Database.INTERFACE_LOGGING (INT_LOG_ID) VALUES ('3654324ghfd');
Please help me. I will be greatefull to you if anyone of you help me to solve it. It is very urgent and important for me.
|
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 12, 2005 5:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Is there an error on the Oracle side when the statement doesn't work?
Is the field you are trying to insert into big enough to support a UUIDASCHAR output? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
dipankar |
Posted: Tue Apr 12, 2005 5:35 am Post subject: reply |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
But please look at this code
INSERT INTO Database.INTERFACE_LOGGING (INT_LOG_ID) VALUES ('3654324ghfd');
It is working absolutely fine in ORACLE. So from here I can believe there is no error in ORACLE side.
And the length of the corresponding field named INT_LOG_ID is VARCHAR2(50). It is enough to support the value of UUIDASCHAR.
Actually I have observed that when I am using a variable in insert statement, the above error has been arised. Please give me a solution. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 12, 2005 5:44 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I did not say that there was anything wrong on the Oracle side.
I suggested you look at the Oracle side because it may give you better information about what is wrong on the ESQL side. You may be able to see the actual Oracle SQL statements that are executed when the "bad" Insert statement is run, including the replacement values. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JT |
Posted: Tue Apr 12, 2005 5:48 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Do you have the following setting in the .odbc.ini file for the data source:
Code: |
EnableDescribeParm=1 |
|
|
Back to top |
|
 |
dipankar |
Posted: Tue Apr 12, 2005 5:59 am Post subject: hi |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
My problem has been solved. Thanks a lot for your help.
The problem was in ORACLE side.
Actually I did not check the check box EnableSQLDescribeParam in advance tab in DSN setting. |
|
Back to top |
|
 |
dipankar |
Posted: Tue Apr 19, 2005 3:35 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
The problem has been resolved. Actually I did not check the check box named EnableSQLDescribeParam in advance tab in System DSN.
Thank you all for your help. |
|
Back to top |
|
 |
|