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.

JDBC driver for ASA 9.0.2

9 posts in General Discussion Last posting was on 2010-02-26 20:01:09.0Z
natalia Posted on 2010-02-24 01:01:41.0Z
Sender: 6694.4b846f1b.1804289383@sybase.com
From: natalia
Newsgroups: ianywhere.public.general
Subject: JDBC driver for ASA 9.0.2
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b847a75.684d.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 23 Feb 2010 17:01:41 -0800
X-Trace: forums-1-dub 1266973301 10.22.241.41 (23 Feb 2010 17:01:41 -0800)
X-Original-Trace: 23 Feb 2010 17:01:41 -0800, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7936
Article PK: 6967

There is a Sybase ASA 9.0.2 database running on remote
server with IP 10.10.1.1 on port 2638. What JDBC driver
should I use to read data from it and how to configure URL
and Driver Class?
Latest JConnect 7 driver with
jdbc:sybase:Tds:10.10.1.1:2638?ServiceName=MY_DB_NAME and
com.sybase.jdbc4.jdbc.SybDriver
return ERROR: "Bad version number in .class file". I guess
having server older than client doesn't work, eh?


Karim Khamis [Sybase iAnywhere] Posted on 2010-02-24 15:09:19.0Z
From: "Karim Khamis [Sybase iAnywhere]" <kkhamis@sybase.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: JDBC driver for ASA 9.0.2
References: <4b847a75.684d.1681692777@sybase.com>
In-Reply-To: <4b847a75.684d.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b85411f$1@forums-1-dub>
Date: 24 Feb 2010 07:09:19 -0800
X-Trace: forums-1-dub 1267024159 10.22.241.152 (24 Feb 2010 07:09:19 -0800)
X-Original-Trace: 24 Feb 2010 07:09:19 -0800, vip152.sybase.com
Lines: 33
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7939
Article PK: 6966

I'm not sure if jConnect 7 has been tested with ASA 9 or not, but I
would guess it should work. The "Bad version number in .class file" is a
JAVA error telling you your JRE is too old. jConnect 7 is a JDBC 4.0
driver and as such requires JRE 1.6 or newer. If your JRE is older than
1.6, then I would suggest switching to a 1.6 JAVA VM and seeing if that
does the trick. The other option is to use the iAnywhere JDBC driver
that comes with ASA 9. To use the iAnywhere JDBC driver:

1) put jodbc.jar in your classpath
2) use ianywhere.ml.jdbcodbc.IDriver as the driver ClassName
3) use jdbc:ianywhere:driver=Adaptive Server Anywhere 9.0;... as the URL
where the ... is replaced with regular ASA connection parameters (like
dbn=...; eng=...; links=...; etc).

Note that if your client is on a UNIX machine and you want to use the
iAnywhere JDBC driver, then your URL needs to be something like:

jdbc:ianywhere:driver=path_of_ASA9_odbc_driver;...

where the path_of_ASA9_odbc_driver is the full path to the ASA 9 ODBC
driver installation (for the same bitness as the JAVA VM).

Karim

natalia wrote:
> There is a Sybase ASA 9.0.2 database running on remote
> server with IP 10.10.1.1 on port 2638. What JDBC driver
> should I use to read data from it and how to configure URL
> and Driver Class?
> Latest JConnect 7 driver with
> jdbc:sybase:Tds:10.10.1.1:2638?ServiceName=MY_DB_NAME and
> com.sybase.jdbc4.jdbc.SybDriver
> return ERROR: "Bad version number in .class file". I guess
> having server older than client doesn't work, eh?


natalia Posted on 2010-02-24 17:03:21.0Z
Sender: 68d3.4b847e26.1804289383@sybase.com
From: natalia
Newsgroups: ianywhere.public.general
Subject: Re: JDBC driver for ASA 9.0.2
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b855bd9.b8a.1681692777@sybase.com>
References: <4b85411f$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Feb 2010 09:03:21 -0800
X-Trace: forums-1-dub 1267031001 10.22.241.41 (24 Feb 2010 09:03:21 -0800)
X-Original-Trace: 24 Feb 2010 09:03:21 -0800, 10.22.241.41
Lines: 52
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7940
Article PK: 6968

thank you for a quick reply!

JVM has not been a problem. It is Version 6 Update 17 (build
1.6.0_17-b04)

I am exploring second option with jodbc.jar.

Can you please help me to form correct URL with following
parameters: <DATABASE_NAME> - quoted or not? <SERVER_IP>,
<PORT>, <C:\<path_to_db_file_on_remote_machine> - quoted??,
and <database_file_name>.

Thanks again for your help!

> I'm not sure if jConnect 7 has been tested with ASA 9 or
> not, but I would guess it should work. The "Bad version
> number in .class file" is a JAVA error telling you your
> JRE is too old. jConnect 7 is a JDBC 4.0 driver and as
> such requires JRE 1.6 or newer. If your JRE is older than
> 1.6, then I would suggest switching to a 1.6 JAVA VM and
> seeing if that does the trick. The other option is to use
> the iAnywhere JDBC driver that comes with ASA 9. To use
> the iAnywhere JDBC driver:
>
> 1) put jodbc.jar in your classpath
> 2) use ianywhere.ml.jdbcodbc.IDriver as the driver
> ClassName 3) use jdbc:ianywhere:driver=Adaptive Server
> Anywhere 9.0;... as the URL where the ... is replaced
> with regular ASA connection parameters (like dbn=...;
> eng=...; links=...; etc).
>
> Note that if your client is on a UNIX machine and you want
> to use the iAnywhere JDBC driver, then your URL needs to
> be something like:
>
> jdbc:ianywhere:driver=path_of_ASA9_odbc_driver;...
>
> where the path_of_ASA9_odbc_driver is the full path to the
> ASA 9 ODBC driver installation (for the same bitness as
> the JAVA VM).
>
> Karim
> natalia wrote:
> > There is a Sybase ASA 9.0.2 database running on remote
> > server with IP 10.10.1.1 on port 2638. What JDBC driver
> > should I use to read data from it and how to configure
> > URL and Driver Class?
> > Latest JConnect 7 driver with
> > jdbc:sybase:Tds:10.10.1.1:2638?ServiceName=MY_DB_NAME
> > and com.sybase.jdbc4.jdbc.SybDriver
> > return ERROR: "Bad version number in .class file". I
> > guess having server older than client doesn't work, eh?


natalia Posted on 2010-02-24 23:28:11.0Z
Sender: 16ee.4b85a042.1804289383@sybase.com
From: natalia
Newsgroups: ianywhere.public.general
Subject: Re: JDBC driver for ASA 9.0.2
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b85b60b.1b52.1681692777@sybase.com>
References: <4b85411f$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Feb 2010 15:28:11 -0800
X-Trace: forums-1-dub 1267054091 10.22.241.41 (24 Feb 2010 15:28:11 -0800)
X-Original-Trace: 24 Feb 2010 15:28:11 -0800, 10.22.241.41
Lines: 54
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7950
Article PK: 6978

Using jodbc.jar file does not work either:
url -- jdbc:ianywhere:driver=Adaptive Server Anywhere
9.0;ENG=10.10.1.1:2638;DBF=C:\path\file.db;DBN=ABC123;
Driver -- ianywhere.ml.jdbcodbc.IDriver
Error:
______________________________________________________________
Unable to retrieve database information because of an error

Error occured while trying to connect to the database

Error connecting to database: (using class
ianywhere.ml.jdbcodbc.IDriver)
no dbjodbc9 in java.library.path

_______________________________________________________

> I'm not sure if jConnect 7 has been tested with ASA 9 or
> not, but I would guess it should work. The "Bad version
> number in .class file" is a JAVA error telling you your
> JRE is too old. jConnect 7 is a JDBC 4.0 driver and as
> such requires JRE 1.6 or newer. If your JRE is older than
> 1.6, then I would suggest switching to a 1.6 JAVA VM and
> seeing if that does the trick. The other option is to use
> the iAnywhere JDBC driver that comes with ASA 9. To use
> the iAnywhere JDBC driver:
>
> 1) put jodbc.jar in your classpath
> 2) use ianywhere.ml.jdbcodbc.IDriver as the driver
> ClassName 3) use jdbc:ianywhere:driver=Adaptive Server
> Anywhere 9.0;... as the URL where the ... is replaced
> with regular ASA connection parameters (like dbn=...;
> eng=...; links=...; etc).
>
> Note that if your client is on a UNIX machine and you want
> to use the iAnywhere JDBC driver, then your URL needs to
> be something like:
>
> jdbc:ianywhere:driver=path_of_ASA9_odbc_driver;...
>
> where the path_of_ASA9_odbc_driver is the full path to the
> ASA 9 ODBC driver installation (for the same bitness as
> the JAVA VM).
>
> Karim
> natalia wrote:
> > There is a Sybase ASA 9.0.2 database running on remote
> > server with IP 10.10.1.1 on port 2638. What JDBC driver
> > should I use to read data from it and how to configure
> > URL and Driver Class?
> > Latest JConnect 7 driver with
> > jdbc:sybase:Tds:10.10.1.1:2638?ServiceName=MY_DB_NAME
> > and com.sybase.jdbc4.jdbc.SybDriver
> > return ERROR: "Bad version number in .class file". I
> > guess having server older than client doesn't work, eh?


Brian Howard Posted on 2010-02-25 12:55:55.0Z
Sender: 3ada.4b867126.1804289383@sybase.com
From: Brian Howard
Newsgroups: ianywhere.public.general
Subject: Re: JDBC driver for ASA 9.0.2
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b86735b.3b76.1681692777@sybase.com>
References: <4b85b60b.1b52.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 Feb 2010 04:55:55 -0800
X-Trace: forums-1-dub 1267102555 10.22.241.41 (25 Feb 2010 04:55:55 -0800)
X-Original-Trace: 25 Feb 2010 04:55:55 -0800, 10.22.241.41
Lines: 75
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7953
Article PK: 6980

Natalia,

I recently spent some time with this driver and I found one
"trick" that might help (this only works on windows - not
UNIX):
- locate the current working directory (usually the
directory you start the program in - the directory with your
.jar files).
- place the following .dll files in this directory:
dbcon9.dll, dbctrs9.dll, dbjodbc9.dll, dblgen9.dll,
dbodbc9.dll, jodbc.jar

That usually gets the job done for the error you have.

Hope that helps...

brian

> Using jodbc.jar file does not work either:
> url -- jdbc:ianywhere:driver=Adaptive Server Anywhere
> 9.0;ENG=10.10.1.1:2638;DBF=C:\path\file.db;DBN=ABC123;
> Driver -- ianywhere.ml.jdbcodbc.IDriver
> Error:
> __________________________________________________________
> ____ Unable to retrieve database information because of an
> error
>
> Error occured while trying to connect to the database
>
> Error connecting to database: (using class
> ianywhere.ml.jdbcodbc.IDriver)
> no dbjodbc9 in java.library.path
>
> _______________________________________________________
>
> > I'm not sure if jConnect 7 has been tested with ASA 9 or
> > not, but I would guess it should work. The "Bad version
> > number in .class file" is a JAVA error telling you your
> > JRE is too old. jConnect 7 is a JDBC 4.0 driver and as
> > such requires JRE 1.6 or newer. If your JRE is older
> > than 1.6, then I would suggest switching to a 1.6 JAVA
> > VM and seeing if that does the trick. The other option
> > is to use the iAnywhere JDBC driver that comes with ASA
> > 9. To use the iAnywhere JDBC driver:
> >
> > 1) put jodbc.jar in your classpath
> > 2) use ianywhere.ml.jdbcodbc.IDriver as the driver
> > ClassName 3) use jdbc:ianywhere:driver=Adaptive Server
> > Anywhere 9.0;... as the URL where the ... is replaced
> > with regular ASA connection parameters (like dbn=...;
> > eng=...; links=...; etc).
> >
> > Note that if your client is on a UNIX machine and you
> > want to use the iAnywhere JDBC driver, then your URL
> > needs to be something like:
> >
> > jdbc:ianywhere:driver=path_of_ASA9_odbc_driver;...
> >
> > where the path_of_ASA9_odbc_driver is the full path to
> > the ASA 9 ODBC driver installation (for the same
> > bitness as the JAVA VM).
> >
> > Karim
> > natalia wrote:
> > > There is a Sybase ASA 9.0.2 database running on remote
> > > server with IP 10.10.1.1 on port 2638. What JDBC
> > > driver should I use to read data from it and how to
> > > configure URL and Driver Class?
> > > Latest JConnect 7 driver with
> > > jdbc:sybase:Tds:10.10.1.1:2638?ServiceName=MY_DB_NAME
> > > and com.sybase.jdbc4.jdbc.SybDriver
> > > return ERROR: "Bad version number in .class file". I
> > > guess having server older than client doesn't work,
> eh?


natalia Posted on 2010-02-25 17:28:24.0Z
Sender: 4412.4b86b1b7.1804289383@sybase.com
From: natalia
Newsgroups: ianywhere.public.general
Subject: Re: JDBC driver for ASA 9.0.2
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b86b338.444e.1681692777@sybase.com>
References: <4b86735b.3b76.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 Feb 2010 09:28:24 -0800
X-Trace: forums-1-dub 1267118904 10.22.241.41 (25 Feb 2010 09:28:24 -0800)
X-Original-Trace: 25 Feb 2010 09:28:24 -0800, 10.22.241.41
Lines: 86
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7961
Article PK: 6989

Thanks for the suggestion. Two questions about it:
1. Do i need to register those dll-s and install SQL
Anywhere client on my machine?
2. Did I manage to put URL together correctly? :

url -- jdbc:ianywhere:driver=Adaptive Server Anywhere
9.0;ENG=10.10.1.1:2638;DBF=C:\path\file.db;DBN=ABC123;

-natalia

> Natalia,
>
> I recently spent some time with this driver and I found
> one "trick" that might help (this only works on windows -
> not UNIX):
> - locate the current working directory (usually the
> directory you start the program in - the directory with
> your .jar files).
> - place the following .dll files in this directory:
> dbcon9.dll, dbctrs9.dll, dbjodbc9.dll, dblgen9.dll,
> dbodbc9.dll, jodbc.jar
>
> That usually gets the job done for the error you have.
>
> Hope that helps...
>
> brian
>
>
> > Using jodbc.jar file does not work either:
> > url -- jdbc:ianywhere:driver=Adaptive Server Anywhere
> > 9.0;ENG=10.10.1.1:2638;DBF=C:\path\file.db;DBN=ABC123;
> > Driver -- ianywhere.ml.jdbcodbc.IDriver
> > Error:
> >
> >
> __________________________________________________________
> > ____ Unable to retrieve database information because of
> an error >
> > Error occured while trying to connect to the database
> >
> > Error connecting to database: (using class
> > ianywhere.ml.jdbcodbc.IDriver)
> > no dbjodbc9 in java.library.path
> >
> > _______________________________________________________
> >
> > > I'm not sure if jConnect 7 has been tested with ASA 9
> > > or not, but I would guess it should work. The "Bad
> > > version number in .class file" is a JAVA error
> > > telling you your JRE is too old. jConnect 7 is a JDBC
> > > 4.0 driver and as such requires JRE 1.6 or newer. If
> > > your JRE is older than 1.6, then I would suggest
> > > switching to a 1.6 JAVA VM and seeing if that does
> > > the trick. The other option is to use the iAnywhere
> > > JDBC driver that comes with ASA 9. To use the
> > iAnywhere JDBC driver: >
> > > 1) put jodbc.jar in your classpath
> > > 2) use ianywhere.ml.jdbcodbc.IDriver as the driver
> > > ClassName 3) use jdbc:ianywhere:driver=Adaptive Server
> > > Anywhere 9.0;... as the URL where the ... is replaced
> > > with regular ASA connection parameters (like dbn=...;
> > > eng=...; links=...; etc).
> > >
> > > Note that if your client is on a UNIX machine and you
> > > want to use the iAnywhere JDBC driver, then your URL
> > > needs to be something like:
> > >
> > > jdbc:ianywhere:driver=path_of_ASA9_odbc_driver;...
> > >
> > > where the path_of_ASA9_odbc_driver is the full path to
> > > the ASA 9 ODBC driver installation (for the same
> > > bitness as the JAVA VM).
> > >
> > > Karim
> > > natalia wrote:
> > > > There is a Sybase ASA 9.0.2 database running on
> > > > remote server with IP 10.10.1.1 on port 2638. What
> > > > JDBC driver should I use to read data from it and
> > > > how to configure URL and Driver Class?
> > > > Latest JConnect 7 driver with
> > > >
> > > >
> jdbc:sybase:Tds:10.10.1.1:2638?ServiceName=MY_DB_NAME and
> > > > com.sybase.jdbc4.jdbc.SybDriver return ERROR: "Bad
> > > > version number in .class file". I guess having
> > server older than client doesn't work, eh?


natalia Posted on 2010-02-26 19:37:08.0Z
Sender: 50b8.4b87119d.1804289383@sybase.com
From: natalia
Newsgroups: ianywhere.public.general
Subject: Re: JDBC driver for ASA 9.0.2
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b8822e4.7c3a.1681692777@sybase.com>
References: <4b86735b.3b76.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Feb 2010 11:37:08 -0800
X-Trace: forums-1-dub 1267213028 10.22.241.41 (26 Feb 2010 11:37:08 -0800)
X-Original-Trace: 26 Feb 2010 11:37:08 -0800, 10.22.241.41
Lines: 87
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7964
Article PK: 6992

Brian,

Do I have to register all those DLLs? Will simple regsvr32
<path & filename of dll> command do? Or do I have to install
SQL Anywhere or something else on the client?

Thanks for your help. Where would I be without it?
-natalia

> Natalia,
>
> I recently spent some time with this driver and I found
> one "trick" that might help (this only works on windows -
> not UNIX):
> - locate the current working directory (usually the
> directory you start the program in - the directory with
> your .jar files).
> - place the following .dll files in this directory:
> dbcon9.dll, dbctrs9.dll, dbjodbc9.dll, dblgen9.dll,
> dbodbc9.dll, jodbc.jar
>
> That usually gets the job done for the error you have.
>
> Hope that helps...
>
> brian
>
>
> > Using jodbc.jar file does not work either:
> > url -- jdbc:ianywhere:driver=Adaptive Server Anywhere
> > 9.0;ENG=10.10.1.1:2638;DBF=C:\path\file.db;DBN=ABC123;
> > Driver -- ianywhere.ml.jdbcodbc.IDriver
> > Error:
> >
> >
> __________________________________________________________
> > ____ Unable to retrieve database information because of
> an error >
> > Error occured while trying to connect to the database
> >
> > Error connecting to database: (using class
> > ianywhere.ml.jdbcodbc.IDriver)
> > no dbjodbc9 in java.library.path
> >
> > _______________________________________________________
> >
> > > I'm not sure if jConnect 7 has been tested with ASA 9
> > > or not, but I would guess it should work. The "Bad
> > > version number in .class file" is a JAVA error
> > > telling you your JRE is too old. jConnect 7 is a JDBC
> > > 4.0 driver and as such requires JRE 1.6 or newer. If
> > > your JRE is older than 1.6, then I would suggest
> > > switching to a 1.6 JAVA VM and seeing if that does
> > > the trick. The other option is to use the iAnywhere
> > > JDBC driver that comes with ASA 9. To use the
> > iAnywhere JDBC driver: >
> > > 1) put jodbc.jar in your classpath
> > > 2) use ianywhere.ml.jdbcodbc.IDriver as the driver
> > > ClassName 3) use jdbc:ianywhere:driver=Adaptive Server
> > > Anywhere 9.0;... as the URL where the ... is replaced
> > > with regular ASA connection parameters (like dbn=...;
> > > eng=...; links=...; etc).
> > >
> > > Note that if your client is on a UNIX machine and you
> > > want to use the iAnywhere JDBC driver, then your URL
> > > needs to be something like:
> > >
> > > jdbc:ianywhere:driver=path_of_ASA9_odbc_driver;...
> > >
> > > where the path_of_ASA9_odbc_driver is the full path to
> > > the ASA 9 ODBC driver installation (for the same
> > > bitness as the JAVA VM).
> > >
> > > Karim
> > > natalia wrote:
> > > > There is a Sybase ASA 9.0.2 database running on
> > > > remote server with IP 10.10.1.1 on port 2638. What
> > > > JDBC driver should I use to read data from it and
> > > > how to configure URL and Driver Class?
> > > > Latest JConnect 7 driver with
> > > >
> > > >
> jdbc:sybase:Tds:10.10.1.1:2638?ServiceName=MY_DB_NAME and
> > > > com.sybase.jdbc4.jdbc.SybDriver return ERROR: "Bad
> > > > version number in .class file". I guess having
> > server older than client doesn't work, eh?


Karim Khamis [Sybase iAnywhere] Posted on 2010-02-26 20:01:09.0Z
From: "Karim Khamis [Sybase iAnywhere]" <kkhamis@sybase.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: JDBC driver for ASA 9.0.2
References: <4b86735b.3b76.1681692777@sybase.com> <4b8822e4.7c3a.1681692777@sybase.com>
In-Reply-To: <4b8822e4.7c3a.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b882885$1@forums-1-dub>
Date: 26 Feb 2010 12:01:09 -0800
X-Trace: forums-1-dub 1267214469 10.22.241.152 (26 Feb 2010 12:01:09 -0800)
X-Original-Trace: 26 Feb 2010 12:01:09 -0800, vip152.sybase.com
Lines: 94
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7965
Article PK: 6993

Natalia,

You only need to register the dbodbc9.dll using regsrv32. The other dlls
simply need to be in the path.

Karim

natalia wrote:
> Brian,
>
> Do I have to register all those DLLs? Will simple regsvr32
> <path & filename of dll> command do? Or do I have to install
> SQL Anywhere or something else on the client?
>
> Thanks for your help. Where would I be without it?
> -natalia
>
>
>> Natalia,
>>
>> I recently spent some time with this driver and I found
>> one "trick" that might help (this only works on windows -
>> not UNIX):
>> - locate the current working directory (usually the
>> directory you start the program in - the directory with
>> your .jar files).
>> - place the following .dll files in this directory:
>> dbcon9.dll, dbctrs9.dll, dbjodbc9.dll, dblgen9.dll,
>> dbodbc9.dll, jodbc.jar
>>
>> That usually gets the job done for the error you have.
>>
>> Hope that helps...
>>
>> brian
>>
>>
>>> Using jodbc.jar file does not work either:
>>> url -- jdbc:ianywhere:driver=Adaptive Server Anywhere
>>> 9.0;ENG=10.10.1.1:2638;DBF=C:\path\file.db;DBN=ABC123;
>>> Driver -- ianywhere.ml.jdbcodbc.IDriver
>>> Error:
>>>
>>>
>> __________________________________________________________
>>> ____ Unable to retrieve database information because of
>> an error >
>>> Error occured while trying to connect to the database
>>>
>>> Error connecting to database: (using class
>>> ianywhere.ml.jdbcodbc.IDriver)
>>> no dbjodbc9 in java.library.path
>>>
>>> _______________________________________________________
>>>
>>>> I'm not sure if jConnect 7 has been tested with ASA 9
>>>> or not, but I would guess it should work. The "Bad
>>>> version number in .class file" is a JAVA error
>>>> telling you your JRE is too old. jConnect 7 is a JDBC
>>>> 4.0 driver and as such requires JRE 1.6 or newer. If
>>>> your JRE is older than 1.6, then I would suggest
>>>> switching to a 1.6 JAVA VM and seeing if that does
>>>> the trick. The other option is to use the iAnywhere
>>>> JDBC driver that comes with ASA 9. To use the
>>> iAnywhere JDBC driver: >
>>>> 1) put jodbc.jar in your classpath
>>>> 2) use ianywhere.ml.jdbcodbc.IDriver as the driver
>>>> ClassName 3) use jdbc:ianywhere:driver=Adaptive Server
>>>> Anywhere 9.0;... as the URL where the ... is replaced
>>>> with regular ASA connection parameters (like dbn=...;
>>>> eng=...; links=...; etc).
>>>>
>>>> Note that if your client is on a UNIX machine and you
>>>> want to use the iAnywhere JDBC driver, then your URL
>>>> needs to be something like:
>>>>
>>>> jdbc:ianywhere:driver=path_of_ASA9_odbc_driver;...
>>>>
>>>> where the path_of_ASA9_odbc_driver is the full path to
>>>> the ASA 9 ODBC driver installation (for the same
>>>> bitness as the JAVA VM).
>>>>
>>>> Karim
>>>> natalia wrote:
>>>>> There is a Sybase ASA 9.0.2 database running on
>>>>> remote server with IP 10.10.1.1 on port 2638. What
>>>>> JDBC driver should I use to read data from it and
>>>>> how to configure URL and Driver Class?
>>>>> Latest JConnect 7 driver with
>>>>>
>>>>>
>> jdbc:sybase:Tds:10.10.1.1:2638?ServiceName=MY_DB_NAME and
>>>>> com.sybase.jdbc4.jdbc.SybDriver return ERROR: "Bad
>>>>> version number in .class file". I guess having
>>> server older than client doesn't work, eh?


Jeff Albion [Sybase iAnywhere] Posted on 2010-02-25 19:52:44.0Z
From: "Jeff Albion [Sybase iAnywhere]" <firstname.lastname@ianywhere.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: JDBC driver for ASA 9.0.2
References: <4b85411f$1@forums-1-dub> <4b85b60b.1b52.1681692777@sybase.com>
In-Reply-To: <4b85b60b.1b52.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b86d50c@forums-1-dub>
Date: 25 Feb 2010 11:52:44 -0800
X-Trace: forums-1-dub 1267127564 10.22.241.152 (25 Feb 2010 11:52:44 -0800)
X-Original-Trace: 25 Feb 2010 11:52:44 -0800, vip152.sybase.com
Lines: 75
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7962
Article PK: 6990

Hi Natalia,

On 2/24/2010 6:28 PM, natalia wrote:
> Error connecting to database: (using class
> ianywhere.ml.jdbcodbc.IDriver)
> no dbjodbc9 in java.library.path

This error is stating that the dbjodbc9.dll file cannot be located in
your system's environment path. Check your %PATH% environment variable
and place the .DLL in a place where it can be located.

> url -- jdbc:ianywhere:driver=Adaptive Server Anywhere
> 9.0;ENG=10.10.1.1:2638;DBF=C:\path\file.db;DBN=ABC123;

The JDBC URL should look like:

jdbc:ianywhere:driver=Adaptive Server Anywhere 9.0;<common ASA
connection parameters>

(Or you can just use a "DSN=" here instead of the "DRIVER=" argument).

where <common ASA connection parameters> are the connection parameters
listed in the documentation for SQL Anywhere:

See:

http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dbdaen9/00000229.htm

---

I'm going to assume you're attempting to connect to a database server on
a remote computer, and not trying to start C:\path\file.db on the local
computer. If this is the case, you cannot use the "DBF=" parameter -
this attempts to start a locally running server with that database.

Instead, you need to run a network database server (dbsrv9) on the
remote computer with the database file (See:
http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dbdaen9/00000013.htm
). If you wanted the database server to be run when the computer starts,
you will need to set up a database service (See:
http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dbdaen9/00000032.htm
).

Once the server is running, you can either "find" it on the network
automatically by engine name (if it's running in the same local IP
subnet) and just use the engine/database connection parameters (e.g.
"ENG=;DBN=;" in the connection string. Or, if you need to connect across
subnets, you will need to add the "LINKS" parameter to the connection
string to directly find the host. Below is a quick example:


Remote Server - located at IP "192.168.0.100"
=============================================

dbsrv9 -n MyDatabaseServer -x tcpip(ME=192.168.0.100;PORT=2638)
c:\path\to\database.db -n MyDatabase

JDBC URL:
=============================================

"jdbc:ianywhere:driver=Adaptive Server Anywhere
9.0;ENG=MyDatabaseServer;DBN=MyDatabase;LINKS=tcpip(HOST=192.168.0.100;PORT=2638)"


Regards,

--
Jeff Albion, Sybase iAnywhere

iAnywhere Developer Community :
http://www.sybase.com/developer/library/sql-anywhere-techcorner
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
SQL Anywhere Patches and EBFs :
http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0
Report a Bug/Open a Case : http://case-express.sybase.com/cx/