Author |
Message
|
Prasi |
Posted: Mon Mar 19, 2012 10:07 pm Post subject: Accessing a remote DB |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
Hi,
I am getting below error when I am trying to access a remote DB. But with the same code it is working in other environments. The DB is a SQL server.
Code: |
PASSTHRU('SELECT CALLFLOWID FROM CONDITION_HEADER WHERE CONDITION_ID IN
(SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = 'SCHEME_CODE' AND VALUE =?) AND CONDITION_ID IN
(SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = 'CIF_TYPE'AND VALUE =?) AND CONDITION_ID IN
(SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = 'MINOR_FLAG' AND VALUE =?)', SchmCode, CustType, MinorFlag);</Text></Insert><DatabaseException><File>/build/S700_P/src/DataFlowEngine/ImbOdbc.cpp</File><Line>349</Line><Function>ImbOdbcHandle::checkRcInner</Function><Type></Type><Name></Name><Label></Label><Catalog>BIPmsgs</Catalog><Severity>3</Severity><Number>2321</Number><Text>Root SQL exception</Text><Insert><Type>2</Type><Text>-1</Text></Insert><Insert><Type>14</Type><Text>libbipodbc.a(odbc.so)</Text></Insert><DatabaseException><File>/build/S700_P/src/DataFlowEngine/ImbOdbc.cpp</File><Line>518</Line><Function>ImbOdbcHandle::checkRcInner</Function><Type></Type><Name></Name><Label></Label><Catalog>BIPmsgs</Catalog><Severity>3</Severity><Number>2322</Number><Text>[b][b]Child SQL exception</Text><Insert><Type>5</Type><Text>20136</Text></Insert><Insert><Type>2</Type><Text>0</Text></Insert><Insert><Type>5</Type><Text>[IBM][ODBC SQL Server Driver]20136</Text></Insert></DatabaseException></DatabaseException[/b][/b]></RecoverableException></RecoverableException></ActualException> |
Please help. |
|
Back to top |
|
 |
adubya |
Posted: Tue Mar 20, 2012 12:52 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
^^^ code tags help formatting when pasting in stuff like this  |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 20, 2012 4:27 am Post subject: Re: Accessing a remote DB |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Prasi wrote: |
I am getting below error when I am trying to access a remote DB. But with the same code it is working in other environments. |
Then compare what's different about the configuration in the working environment & the non-working environment. A trace may help.
If it's the same code in both places it's clearly not a code issue. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 20, 2012 5:18 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
ESQL has no knowledge of the fact that a given database is local or remote.
ESQL only has knowledge of the name of the DataSource Name. |
|
Back to top |
|
 |
Prasi |
Posted: Tue Mar 20, 2012 10:36 am Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
I agree. I have checked the configurations and everything seems to be perfect. This happens only for SELECT query. UPDATE and INSERT queries are working. |
|
Back to top |
|
 |
mqsiuser |
Posted: Tue Mar 20, 2012 11:11 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
Prasi wrote: |
This happens only for SELECT query. UPDATE and INSERT queries are working. |
Reduce your select (e.g. "select * from myTable"). Test & put things (from the where-clause) in "incrementally". _________________ Just use REFERENCEs |
|
Back to top |
|
 |
vishnurajnr |
Posted: Tue Mar 20, 2012 7:24 pm Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Suggest you to check the datatype of the column you are selecting and ensure it is a Broker supported data type. |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Mar 21, 2012 12:41 am Post subject: Re: Accessing a remote DB |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
Prasi wrote: |
Code: |
PASSTHRU('SELECT CALLFLOWID FROM CONDITION_HEADER
WHERE CONDITION_ID IN (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = 'SCHEME_CODE' AND VALUE =?)
AND CONDITION_ID IN (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = 'CIF_TYPE' AND VALUE =?)
AND CONDITION_ID IN (SELECT CONDITION_ID FROM CONDITION_DETAIL WHERE FIELD = 'MINOR_FLAG' AND VALUE =?)',
SchmCode, CustType, MinorFlag); |
|
What does the actual PASSTHRU statement look like? Are there single quotes nested inside the PASSTHRU string? |
|
Back to top |
|
 |
mqsiuser |
Posted: Wed Mar 21, 2012 12:56 am Post subject: Re: Accessing a remote DB |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
rekarm01 wrote: |
What does the actual PASSTHRU statement look like? Are there single quotes nested inside the PASSTHRU string? |
I think that there is something wrong with your PASSTHRU-String... there also has been discussion before. _________________ Just use REFERENCEs |
|
Back to top |
|
 |
|