As an example:
Connection connection = getASAConnection("localhost",
"2638", "DBA", "SQL");
try {
Statement selectStatement = connection.createStatement();
selectStatement.executeQuery(
connection.nativeSQL("connect database SUPPORT") );
} catch (Exception e) {
e.printStackTrace();
}
getting the following stacktrace:
com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -131:
Syntax error near 'connect' on line 1
at
com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2796)
at
com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2126)
at
com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:220)
at
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:203)
at
com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1578)
at
com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:156
3)
at
com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:418
)
Any help or insight to this problem is greatly appreciated.
Jeff Buser
Northrop Grumman Mission Systems
jeffre...@ngc.com
SQL Anywhere: 9.0.2.3182
JDK: 1.5_10
SQL Anywhere Developer Community:
http://www.sybase.com/developer/library/sql-anywhere-techcorner
SQL Anywhere Blog Center: http://www.sybase.com/sqlanyblogs
<Jeff Buser> wrote in message news:48a57913.21a...@sybase.com...