jdbc connection to Sybase



Hi

I have an application that's sending the below SQL to a Sybase
database. Version 12.5

---
String proc is set to

exec p_setPERunType 1, 'CorpMarks', "set rowcount 100
select distinct symbol = rtrim(y.symbol) from yieldcurve y where
pe_run_type = 1 and exists(select * from yieldcurvecomponent yc where
y.symbol = yc.symbol) and exists(select * from gridpointhist h where
y.symbol = h.symbol) and industrycode != 'AG'", 'outfile.data', null,
'PECorpMarks', 'update', 'vladimirn', ''

Then I call

Statement deststmt = dest.createStatement();
deststmt.execute(proc);

---
The result is an error message that says

SQL Exception generated. The identifier that starts with '"set
rowcount 100
select dis' is too long. Maximum length is 28.

I'm new to JDBC, there's nothing wrong with the SQL itself, when I cut
and paste it into an isql session it executes just fine. Is there some
parameter Inbeed to set to make JDBC take the whole thing?

As a side note, I'm not the author of the SQL.

.



Relevant Pages