Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem:Sybase JDBC driver does not allow compiling batch file with stored procedures, but SQL Advantage - DOES with same script!!!!

13 views
Skip to first unread message

Sergey Litsenko

unread,
Oct 10, 2002, 2:42:19 AM10/10/02
to
I found serious problem (IMHO) in JConnect (jConnect (TM) for
JDBC(TM)/5.5(Build 25159)/P/EBF10636/JDK12/Thu Sep 5 16:01:31 2002). Same
problem with Cover.ROLL.10481 - all JDBC scripts are passed.

Sybase JDBC driver does not allow compiling batch file with stored
procedures, but SQL Advantage - DOES - with the same script!!!!

Is there are any cure?

In order to repeat a BUG:

Simple script:

create procedure AAA (@name varchar(255)) -- this is name

as

begin

print @name

end

go

This script successfully passed with SQL Advantage and really works (believe
me :)).

But JISQL returns an Exception.

com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near ')'.

at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2672)

at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2032)

at
com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)

at
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204)

at
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187)

at
com.sybase.jdbc2.jdbc.SybStatement.executeLoop(SybStatement.java:1705)

at
com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:1697)

at
com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:773)

at
com.sybase.jisql.ExecQueryThread.executeIt(ExecQueryThread.java:144)

at com.sybase.jisql.ExecQueryThread.run(ExecQueryThread.java:70)

After over 2 hours of digging with ANT, hundreds of stored procedures and
script files, I suddenly realize - JConnect DOES NOT RECOGNIZING A SINGLE
line comment:

Example, which is passed successfully on SQL Advantage and JISQL:

create procedure AAA (@name varchar(255)) /*-- this is name */

as

begin

print @name

end

go

Unfortunately, I can not apply my efforts to "comment all my comments" in
stored procedures - last year I have developed over 1000 stored procedures
(all of them contains comments), and right now I just need to create a build
file for ANT in order to pass scripts on server side.

Sincerely yours

Sergey Litsenko

odbcpse

unread,
Oct 10, 2002, 10:22:42 AM10/10/02
to Sergey Litsenko
Hello,

If the SQL is passed to ASE correctly, like in a jdbc program with the
execute method and
a string like this:

String query = "create procedure AAA (@name varchar(255)) -- this is
name\nas\nbegin\nprint @name\nend";

the transaction is successful. So the problem is not with jConnect -
the driver is fine in that
respect. The problem is with JISQL - It is not parsing the command
properly - it seems to be stripping out
the new lines in the sproc text. You should open a Tech Support case
with Sybase to get jisql fixed.

pv

Litsenko Sergey

unread,
Oct 10, 2002, 12:32:26 PM10/10/02
to

Hello.

Unfortunately, problem is with jConnect JDBC driver - ANT uses JDBC in order
to run SQL task. In my previous message you can see a JConnect exception :

com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near ')'.

^^^^ ^^^^^^^^

I have checked twise before telling this stuff.

And Jisql return the same exception like ANT-SQL Task - JConnect.

So,.... I dont need JISQL - I need just well debugged version of jConnect :)

Sergey

"odbcpse" <hu...@earth.com> wrote in message
news:3DA58D32...@earth.com...

Sergey Litsenko

unread,
Oct 11, 2002, 12:49:39 AM10/11/02
to
I have another question:
How to open Tech Support case, if in http://casexpress.sybase.com/cx/cx.stm
in Product family list only following items:
- Family 1 - Power Builder
- Family 5 - Power Designer
- Family 6 - SQL Anywhere
- Family 11 - PowerJ
- Family 12 - EA Studio
- Family 13 - EA Server

Where is other items, such as ASE (or database servers, etc), JConnect?

Why this list totally differ from Your http://www.sybase.com/products page
with
PRODUCTS BY FAMILY list?

Or, perhaps, it is another BUG? Should I send Bug report about "Submit a
Bug" page bug? :))

Pretty funny,
Sergey

"odbcpse" <hu...@earth.com> wrote in message
news:3DA58D32...@earth.com...

odbcpse

unread,
Oct 14, 2002, 10:55:17 AM10/14/02
to Sergey Litsenko
The product listing should be based on the type of license your site
has.
For jConnect, you should be able to see product such as Software
Developer's Kit
of jConnect for JDBC, or something like that. If this is not the case
it means that
something is wrong with your licensing not the system itself.

odbcpse

unread,
Oct 14, 2002, 10:57:48 AM10/14/02
to odbcpse
To eloborate a littel, in the Transact SQL:

String query = "create procedure AAA (@name varchar(255)) -- this is
> > name\nas\nbegin\nprint @name\nend";

I entered the "\n" so that the line could be broken up. Sybase T-SQL
needs
something to differentiate the comments when they use the "--"

odbcpse wrote:
>
> I was comparing jisql with using jdbc method call in a simple
> application.
> I did not use ANT, I do not even know what it is but what I am saying is
> that
> you need to look at how the SQL itself is being prepared for execution.
> jConnect is just reporting the exception because this is how the Sybase
> ASE
> server that i used is reacting to the syntax.
>
> pv

odbcpse

unread,
Oct 14, 2002, 10:50:50 AM10/14/02
to Litsenko Sergey
I was comparing jisql with using jdbc method call in a simple
application.
I did not use ANT, I do not even know what it is but what I am saying is
that
you need to look at how the SQL itself is being prepared for execution.
jConnect is just reporting the exception because this is how the Sybase
ASE
server that i used is reacting to the syntax.

pv

Sergey Litsenko

unread,
Oct 14, 2002, 8:45:58 PM10/14/02
to
> The product listing should be based on the type of license your site has.
If your opinion is right, I should NOT be able to see PowerJ, EA Studio, EA
Server, Power Builder, ...
Using your words - "...I do not even know what it is..." :)
My company does NOT purchased these products - only ASE 11/12.


> For jConnect, you should be able to see product such as Software

Developer's Kit,


> of jConnect for JDBC, or something like that

I should be able to see, but I dont see anything similar :(

> something is wrong with your licensing not the system itself.

What kind of licensing should my company have to purchase in addition to
bying ASE 11/12???

I just try to submit a bug report, which do not require immediate technical
assistance - so, support is not needed -
I only helping to your company to make products better.
But, if your company does not interesting in making products at least a bit
better,
- OK, I will not try to submit a bug again :(


"odbcpse" <hu...@earth.com> wrote in message

news:3DAADAD5...@earth.com...

odbcpse

unread,
Oct 15, 2002, 12:23:37 PM10/15/02
to Sergey Litsenko
Please call 1 -800 - 879 - 2273 (800-8SYBASE) and report the problems you are
discussing - this newsgroup is not the place for this type of discussion - I am
just trying to point out that jConnect does not parse SQL to the degree that you
want it to and that you need to get technical support assistance to look into
the matter further.

pv

J

unread,
Oct 15, 2002, 11:59:07 AM10/15/02
to
On Tue, 15 Oct 2002 09:23:37 -0700, odbcpse <hu...@earth.com> wrote:

To add to what Paul has said. Sybase does not charge for jConnect so
it is not carried as a Product per se, it is distributed with Sql
Anywhere and ASE so you should be able to report the problem there if
you have a support contract for ASE.

J

Sergey Litsenko

unread,
Oct 14, 2002, 10:06:47 PM10/14/02
to
>I did not use ANT, I do not even know what it is
Apache Ant is a very famous among Java Developers Community Java-based build
tool. Ant is extended using Java classes. Instead of writing shell commands,
the configuration files are XML-based, calling out a target tree where
various tasks get executed. Each task is run by an object that implements a
particular Task interface.
See for more details http://jakarta.apache.org/ant/index.html

> you need to look at how the SQL itself is being prepared for execution.

I made PROTOCOL_CAPTURE for that simple example - it seems to be a bug in
JISQL (yes, not in JConnect itself)
- it does not recognized a carriage return:

<skipped>
LANGUAGE Token (0x21); variable length.
Length [4]: 84
Status [1]: UNUSED (0x00)
Text Length [0]: [83]
Text [83]: " create procedure AAA (@name


varchar(255)) -- this is name as begin print @name end"

Capture Record Header
Source [4]: RESPONSE (0x00000002)
Length [4]: 71

PDU Header
TDS Packet Type [1]: BUF_RESPONSE (0x04)
Status [1]: BUFSTAT_EOM (0x01)
Length [2]: 71
Channel [2]: 0
Packet No. [1]: 0
Window [1]: 0

EED Token (0xE5); variable length.
Length [2]: 51
Message Number [4]: 102
Message State [1]: 1
Message Class [1]: 15
SQL State Length [1]: 5
SQL State [5]: "42000"
Status [1]: NO_EED (0x00)
Transaction State [2]: TDS_TRAN_SUCCEED (0x0001)
Message Length [2]: 27
Message Text [27]: "Incorrect syntax near ')'."

<skipped>


Could you please report a bug to JISQL team, because I can't submit a bug
(I'm already explained, why)


Sergey


"odbcpse" <hu...@earth.com> wrote in message

news:3DAAD9CA...@earth.com...

0 new messages