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
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
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...
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...
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
pv
> 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...
pv
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
> 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...