cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC query error:Error while parsing or executing XML-SQL document

Former Member
0 Kudos

hi experts,

in a scenario(without BPM), file->XI-->file.....

in a message mapping, i used Lookup API to call a JDBC...using a JDBC receiver channel....

i have used a query:

Query1 = "SELECT ReportID, Row_ID, WDCode, WDDest, MarketSKU, Sales, Damages, BranchMapID, Status, ToDate from test1 where Status='0'";

try{

channel = LookupService.getChannel("BS_sdptestJDBCReceiver","CC_sdptestJDBCReceiver");

//Get a system accessor for the channel. As the call is being made to an DB, an DatabaseAccessor is obtained.

accessor = LookupService.getDataBaseAccessor(channel);

resultSet = accessor.execute(Query1);

}

the error is recive is:

Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.

help me........

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

><i>The statement did not return a result set.</i>

Check if the Select query is valid and has data in the table for it.

Regards

Bhavesh

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

What is your receiver database , if it is Oracle database then you need to use the query in capital letters ..

And check the Structure of inbound message , it should be supported by the JDBC structure,

And check the table name and the other fields ..

Also check the table is existed or not

if it is not like that then we will get SQL-XML parser exception..

Regards

Chilla

Former Member
0 Kudos

hi chandra...

the databse is sqlserver.....the query is running fine on the query analyzer ....so there is no such error in the query,

is there any error in the formation of the query String....i mean to say,....the use of double-quotes etc...in the java code.....

theres something calles sqlLog in Xi....where can i see it.....

first i formed the query string as:

Query1 = "SELECT ReportID, Row_ID, WDCode, WDDest, MarketSKU, Sales, Damages, BranchMapID, Status, ToDate from test1 where Status='0'";

then i formed it as:

Query1 = "SELECT ReportID, Row_ID, WDCode, WDDest, MarketSKU, Sales, Damages, BranchMapID, Status, ToDate from test1 where Status=""'"0+"'";

but both are giving errors....