cancel
Showing results for 
Search instead for 
Did you mean: 

File to JDBC :Error when executing statement for table/stored proc.

Former Member
0 Kudos

Hi,

I am getting following error when i am trying to insert data into z-table using JDBC recr adapter.

Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ZTEST' (structure 'STATEMENT'): java.sql.SQLException: <u>[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name '<b>ZTEST</b>'.</u>

But the database table name 'ZTEST' exists in the system.

XML structure:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_RECR xmlns:ns0="http://urn:srini/FileToJDBC">

<STATEMENT>

<TEST action="INSERT">

<table>ZTEST</table>

<access>

<ROLLNO>123</ROLLNO>

<FIRSTNAME>ABC</FIRSTNAME>

<LASTNAME>XYZ</LASTNAME>

</access>

</TEST>

</STATEMENT>

</ns0:MT_RECR>

Regards,

Srinivas

Accepted Solutions (1)

Accepted Solutions (1)

former_member529475
Active Contributor
0 Kudos

Hi Srinivas,

Please can you go through this thread

Speaks about the same issue and it got resolved!!

Cheers...

Vasu

<b>** REward POints if found useful **</b>

Former Member
0 Kudos

Hi Vasudev,

here i am not using any stored procedures.i am just giving database table as "ZTEST' with action 'INSERT'.Now the prblem with table name and error is invalid object name.

Regards,

srinivas

Answers (3)

Answers (3)

prabhu_s2
Active Contributor
0 Kudos

did u check at the blog pointed. also are u refering to the right database as given in the connectivity string?

Former Member
0 Kudos

Hi Prabhu,

Yes, I have tried that blog too.Initially i have faced connectivity problems and after passing correct parameters that problem was solved.I dont know why it is giving error " invalid object name'.I have checked the table and settings in the system.here i am trying to insert into XI sys z-table.

any idea?

Regards,

srinivas

prabhu_s2
Active Contributor
0 Kudos

<b>>>>>here i am trying to insert into XI sys z-table.</b>

u mean that u want to insert data into a Z-Table created in XI? in this case with teh current set u will not be able to do so. the system checks if the table is in the sql database that u are using

Former Member
0 Kudos

Hi Prabhu,

Thx for the update.

Database is same for Xi sys and z-table. In XI sys, there is a z-table called 'ZTEST'.I am giving same DB details and trying to insert into the table from a file.

reg,

Srinivas

prabhu_s2
Active Contributor
0 Kudos

login to ur xi session. from the menubar click system > status. There u can see what DB u are using. can u post on the DB name?

Former Member
0 Kudos

Hi Prabhu,

I cross checked with XI session parameters with JDBC recr adapter parameters and also in DB02.Hostname,DB name are same.Even i logged into database thru SQL DB studio with given username and password in JDBC parameters.everything is fine.

regards,

Srinivas

prabhu_s2
Active Contributor
0 Kudos

<b>Initially i have faced connectivity problems and after passing correct parameters that problem was solved</b>

as it was working fine earlier did u change on the MT or any settings. relook into the interface and DB. Check if the DB was migrated recently

Former Member
0 Kudos

Hi,

Maybe I am sounding a bit dumb, but you can try restarting the JDBC Adapter from Visual Admin. One of our DB scenarios got an error intially, but after we corrected the error, the adapter did not refresh the metadata automatically. Restarting the JDBC adapter did the trick.

Keeping fingers crossed...

Regards,

Amitabha

Former Member
0 Kudos

hi Srinivas

Please check for any other table or do one thing

Please check ure Message type structure, the Table tag should be at the same level at the TEST level

Rgds

Aditya

Former Member
0 Kudos

Hi,

I have changed my MT str but still getting the same error.Is it possible to insert/ update a z-table using JDBC adapter.

XML str:

-


<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_RECR xmlns:ns0="http://urn:srini/FileToJDBC">

<STATEMENT>

<ZTEST action="INSERT">

<access>

<ROLLNO>123</ROLLNO>

<FIRSTNAME>abc</FIRSTNAME>

<LASTNAME>XYZ</LASTNAME>

</access>

</ZTEST>

</STATEMENT>

</ns0:MT_RECR>

Regards,

Srinivas

prabhu_s2
Active Contributor
0 Kudos

ur strucutre shud be like:

 <StatementName2>
<dbTableName action=”INSERT”>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>  
  </StatementName2>

is ur table name valid?

prabhu_s2
Active Contributor
0 Kudos

u can also check:

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

Former Member
0 Kudos

Hi,

Yes,the table name is valid. I have tried with above structure but still no luck and getting the same error.

Regards,

srinivas

Former Member
0 Kudos

Hi,

Check wether the JDBC DRIVER, CONNECTION parameters that you are using is right one.

You xml structure has to be

<b><data type>

<sub element statement name>

<subelement table name>

<attribute action>

<subelement access></b>

Hope it work.

Cheers,<b>

*RAJ*

*REWARD POINTS IF USEFULL*</b>

Former Member
0 Kudos

Hi,

Please check ur MT for JDBC receiver. This shows what XML XI sending JDBC adapter is unable to process it.

Thanks

Farooq.