cancel
Showing results for 
Search instead for 
Did you mean: 

Stored Procedure for Databases

Former Member
0 Kudos

Hi All,

Can we use Stored Procedure to read from Sybase Tables using sender JDBC Adapter?

Regards,

XIer

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Xier,

We can use SP for Sybase. I never tried. Please refer Bhavesh's reply in the below thread.

raj.

Former Member
0 Kudos

Raj, I am using the same, however I receive the error:

<b>Database-level error reported by JDBC driver while executing statement 'execute fax_p_sap_test'. The JDBC driver returned the following error message: 'com.sybase.jdbc3.jdbc.SybSQLException: Stored procedure 'fax_p_sap_test' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode. '. For details, contact your database server vendor.</b>

Please Advice.

Regards,

Xier

justin_santhanam
Active Contributor
0 Kudos

XIer,

I read the below threads , I think it will be useful. Just read the below two links.

https://www.openadaptor.org/developerFAQ.html [ Read under Sybase Faq's]

http://groups.google.com/group/sybase.public.jconnect50/browse_thread/thread/833143dc223d1a33/9db2c6...

raj.

Former Member
0 Kudos

hey

you may also have a look at the following blog

/people/sap.user72/blog/2006/02/22/xi-recent-enhancements-to-jdbc-adapter

i guess you can give some parameters in the connection string itself.

posting the question in Sybase forum as well won't hurt

Thanx

Aamir

Former Member
0 Kudos

Guys I have tried following so many websites but still no luck...

Xier

prateek
Active Contributor
0 Kudos

Stored procedure could be written in chained or unchained mode. Default is unchained. The major difference is - in chained mode the number of "begin transaction" statements must match the number of commit "transaction statements".

1. Run the Sybase command:

sp_procxmode <procedure_name>,"anymode"

2. Call the method setAutoCommit(true) on the connection object

Regards,

Prateek

Former Member
0 Kudos

Hi,

Have a look at

<a href="/people/sap.user72/blog/2005/10/15/jdbc-adapter-execution-mode-chained-or-unchained Adapter execution mode Chained or Unchained ??</a> Naveen's blog where he discussed the same issue and the solution.

Regards,

Jai Shankar

Answers (0)