Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

jconnect vs jdbc:odbc beviour bug

7 posts in JConnect version 3.0 Last posting was on 1999-03-29 12:08:15.0Z
Aetna Posted on 1999-03-23 11:35:49.0Z
From: "Aetna" <john.cummings@aetna.com>
Subject: jconnect vs jdbc:odbc beviour bug
Date: Tue, 23 Mar 1999 06:35:49 -0500
Lines: 13
Organization: Aetna
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Message-ID: <bpkuAESd#GA.284@forums.sybase.com>
Newsgroups: sybase.public.jconnect30
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:290
Article PK: 255696

hi,

starting about a month ago, i documented a bug when using
jconnect/sqlanywhere vs jdbc:odbc/sqlanywhere ("column 'aP0' not
found"). i built a small test program to demonstrate this & sent in. i tried
with jconnect 4.0 and the same behaviour exists. testing was done with vcafe
3.0.

has anyone looked at it?

john cummings


Lance Andersen Posted on 1999-03-25 16:33:19.0Z
Message-ID: <36FA654F.EAFCE090@sybase.com>
Date: Thu, 25 Mar 1999 11:33:19 -0500
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.5.1 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: jconnect vs jdbc:odbc beviour bug
References: <bpkuAESd#GA.284@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 40
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:285
Article PK: 254597


Aetna wrote:
>
> hi,
>
> starting about a month ago, i documented a bug when using
> jconnect/sqlanywhere vs jdbc:odbc/sqlanywhere ("column 'aP0' not
> found"). i built a small test program to demonstrate this & sent in. i tried
> with jconnect 4.0 and the same behaviour exists. testing was done with vcafe
> 3.0.
>
> has anyone looked at it?
>
> john cummings

I looked at this today and it would be helpful in the future to please
add a readme or try and not use an IDE. The best thing that could be
done is for you to use a simple standalone program.

If I understood your problem, You had 1 PreparedStatement of

prepareStatement("select * from phones where calleroid = ?" );
ps.setint(1,12);


Nothing obvious that I can see that would cause a problem. I am not
sure what version of SQL Anywhere or the OSG you are using. However, I
strongly reccommend that you try the same test using ASA as you do not
need the OSG and I found the OSG to be a tad buggy.

You can also use Ribo to examine the TDS which was sent. Set the
PROTOCOL_CAPTURE property to the path of where to dump the tds trace.

-Lance
team sybase
--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Product Support Engineering Phone:(781) 564-6336
77 South Bedford Street Fax: (781) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================


Aetna Posted on 1999-03-26 11:21:24.0Z
From: "Aetna" <john.cummings@aetna.com>
References: <bpkuAESd#GA.284@forums.sybase.com> <36FA654F.EAFCE090@sybase.com>
Subject: Re: jconnect vs jdbc:odbc beviour bug
Date: Fri, 26 Mar 1999 06:21:24 -0500
Lines: 14
Organization: Aetna
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Message-ID: <h5Fl6p3d#GA.217@forums.sybase.com>
Newsgroups: sybase.public.jconnect30
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:284
Article PK: 255692

lance,

thanks for the info. i'll try to upgrade to ASA. in the meantime,
what is "Ribo"? aiso, doc says that the output of capture is binary. do you
interpret it?

"You can also use Ribo to examine the TDS which was sent. Set the
PROTOCOL_CAPTURE property "

john


Aetna Posted on 1999-03-26 12:26:48.0Z
From: "Aetna" <john.cummings@aetna.com>
References: <bpkuAESd#GA.284@forums.sybase.com> <36FA654F.EAFCE090@sybase.com> <h5Fl6p3d#GA.217@forums.sybase.com>
Subject: Re: jconnect vs jdbc:odbc beviour bug
Date: Fri, 26 Mar 1999 07:26:48 -0500
Lines: 58
Organization: Aetna
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Message-ID: <CXhudO4d#GA.217@forums.sybase.com>
Newsgroups: sybase.public.jconnect30
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:283
Article PK: 255693

lance,

i did a capture on the connection. it's attached.

i'm using Sybase SQL Anywhere Version 5.0.03 and Sybase SQL Anywhere Network
Server Version 5.0.03 Build #884.

john


Lance Andersen Posted on 1999-03-26 16:16:50.0Z
Message-ID: <36FBB2F2.FD299D35@sybase.com>
Date: Fri, 26 Mar 1999 11:16:50 -0500
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.7 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: jconnect vs jdbc:odbc beviour bug
References: <bpkuAESd#GA.284@forums.sybase.com> <36FA654F.EAFCE090@sybase.com> <h5Fl6p3d#GA.217@forums.sybase.com> <CXhudO4d#GA.217@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 39
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:282
Article PK: 254594


Aetna wrote:
>
> lance,
>
> i did a capture on the connection. it's attached.
>
> i'm using Sybase SQL Anywhere Version 5.0.03 and Sybase SQL Anywhere Network
> Server Version 5.0.03 Build #884.
>
> john

Hi John,

You can work around this issue by setting the driver property
LITERAL_PARAMS to 'true'



Your problem again will be resolved when you move up to ASA and I
believe possibly 5.0.0.4 of SQL Anywhere. Here is the issue which we
document in our release notes:


http://www.sybase.com/products/internet/jconnect/docs4/inst_4.htm#HEADING4-102

PreparedStatements with input parameters do not work because they are
sent as
"parameterized" language commands. Early versions of SQLAnywhere do not
support parameterized language, resulting in an error such as "52003 -
column '@p1' not found."


To avoid this problem, set the LITERAL_PARAMS driver property to
"true." This causes any parameters set by the setXXX methods in
PreparedStatements to be inserted literally into the SQL statement when
it is executed.

Regards,
Lance
Team Sybase
--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Product Support Engineering Phone:(781) 564-6336
77 South Bedford Street Fax: (781) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================


Aetna Posted on 1999-03-26 21:58:25.0Z
From: "Aetna" <john.cummings@aetna.com>
References: <bpkuAESd#GA.284@forums.sybase.com> <36FA654F.EAFCE090@sybase.com> <h5Fl6p3d#GA.217@forums.sybase.com> <CXhudO4d#GA.217@forums.sybase.com> <36FBB2F2.FD299D35@sybase.com>
Subject: Re: jconnect vs jdbc:odbc beviour bug
Date: Fri, 26 Mar 1999 16:58:25 -0500
Lines: 25
Organization: Aetna
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Message-ID: <kPJF4N9d#GA.74@forums.sybase.com>
Newsgroups: sybase.public.jconnect30
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:281
Article PK: 255757

lance

To avoid this problem, set the LITERAL_PARAMS driver property to
>"true."

worked like a charm.

however, i still have a problem which is the reason i tried jconnect in the
first place. i have a sybase db that i'm accessing through the jdbc:odbc
bridge. we use ms outlook98 as our mail system. for some reason, when i have
an open connection to the db, i cannot launch ms word to open document
attachments. as soon as i close the connection, word launches no problem. i
have the same problem with jdbc:odbc against ms access db. so the problem
seems to be jdbc:odbc or maybe just odbc. that's why i thought that jconnect
could help. so i guess the question is, does jconnect use my odbc drivers?
i've loaded data into an oracle db and used oracle type 2 driver and don't
have the problem. however, i have a big investment (learning) in sybase, so
would rather not switch

any thought would be appreciated.

john


Lance Andersen Posted on 1999-03-29 12:08:15.0Z
Message-ID: <36FF6D2F.CF3C647D@sybase.com>
Date: Mon, 29 Mar 1999 07:08:15 -0500
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.7 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Aetna <john.cummings@aetna.com>
Subject: Re: jconnect vs jdbc:odbc beviour bug
References: <bpkuAESd#GA.284@forums.sybase.com> <36FA654F.EAFCE090@sybase.com> <h5Fl6p3d#GA.217@forums.sybase.com> <CXhudO4d#GA.217@forums.sybase.com> <36FBB2F2.FD299D35@sybase.com> <kPJF4N9d#GA.74@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 48
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:280
Article PK: 254593

How are you starting SQL Anywhere?

jConnect is 100% pure java. If you are saying that you cannot launch
word , you encounter problems accessing non-SQL Anywhere data, then I
don't have a clue. do you see a hang, get an error message?

I am not sure whether the Open Server Gateway uses ODBC to connect to
the backend.

Again, if you go to ASA instead of using SQL Anywhere, I suspect life
will be better (and faster).

Lance

Team Sybase

Aetna wrote:
>
> lance
>
> To avoid this problem, set the LITERAL_PARAMS driver property to
> >"true."
>
> worked like a charm.
>
> however, i still have a problem which is the reason i tried jconnect in the
> first place. i have a sybase db that i'm accessing through the jdbc:odbc
> bridge. we use ms outlook98 as our mail system. for some reason, when i have
> an open connection to the db, i cannot launch ms word to open document
> attachments. as soon as i close the connection, word launches no problem. i
> have the same problem with jdbc:odbc against ms access db. so the problem
> seems to be jdbc:odbc or maybe just odbc. that's why i thought that jconnect
> could help. so i guess the question is, does jconnect use my odbc drivers?
> i've loaded data into an oracle db and used oracle type 2 driver and don't
> have the problem. however, i have a big investment (learning) in sybase, so
> would rather not switch
>
> any thought would be appreciated.
>
> john

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Product Support Engineering Phone:(781) 564-6336
77 South Bedford Street Fax: (781) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================