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.

connecting to database in ASA 6.0 using jdbc

2 posts in Windows NT Last posting was on 2000-07-13 01:50:43.0Z
bhrugesh Posted on 2000-07-05 18:20:52.0Z
From: "bhrugesh" <b.shah@1internet.com>
Subject: connecting to database in ASA 6.0 using jdbc
Date: Wed, 5 Jul 2000 13:20:52 -0500
Lines: 25
Organization: 1internet
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <J1Qd37q5$GA.95@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: tmp3.1internet.com 216.112.146.35
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1936
Article PK: 1089378

Hi,
I am using Adaptive Server AnyWhere 6.0 & I want to connect to database
through my java application. I am using connection pool & property file to
connect to database.
Here is the sample of db properties file

drivers=com.sybase.jdbc.SybDriver
demo.url=jdbc:sybase:Tds:127.0.0.1:2638
demo.user=dba
demo.password=sql
demo.initconns=5
demo.maxconns=10

Now I want to connect multi[ple database by providing different url name in
above property file. So How do I give different database file name in url.
And also when I try to run my application without starting database server
it is giving error. How do I start db server automatically.

Can I use the same server with multiple database files???

Thanks

Bhrugesh


jlgilman Posted on 2000-07-13 01:50:43.0Z
From: "jlgilman" <jlgit@hitchcock.org>
References: <J1Qd37q5$GA.95@forums.sybase.com>
Subject: Re: connecting to database in ASA 6.0 using jdbc
Date: Wed, 12 Jul 2000 21:50:43 -0400
Lines: 49
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <vMU663G7$GA.70@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: vpn1-20.hitchcock.org 130.189.38.170
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1903
Article PK: 1089311

Yes you can run multiple databases on your Adaptive Server Anywhere 6.0.x
and connect with your Java
app to each.
By default the first databased specified in the server db engine startup is
the one your Java app will
connect to unless otherwise specified.

Use the ?servicename=mydb option in the connect string to use a specific
database.
For example if one of the databases is named db1 use:

demo.url=jdbc:sybase:Tds:127.0.0.1:2638?servicename=db1
Hope this helps.
See the Sybase resolution at
http://info.sybase.com/cgi-bin/om_isapi.dll?clientID=118033&infobase=resex4.
nfo&query=servicename&ranked=on&record={13E5}&softpage=Doc_Frame_Pg42

John

"bhrugesh" <b.shah@1internet.com> wrote in message
news:J1Qd37q5$GA.95@forums.sybase.com...
> Hi,
> I am using Adaptive Server AnyWhere 6.0 & I want to connect to database
> through my java application. I am using connection pool & property file to
> connect to database.
> Here is the sample of db properties file
>
> drivers=com.sybase.jdbc.SybDriver
> demo.url=jdbc:sybase:Tds:127.0.0.1:2638
> demo.user=dba
> demo.password=sql
> demo.initconns=5
> demo.maxconns=10
>
> Now I want to connect multi[ple database by providing different url name
in
> above property file. So How do I give different database file name in url.
> And also when I try to run my application without starting database server
> it is giving error. How do I start db server automatically.
>
> Can I use the same server with multiple database files???
>
> Thanks
>
> Bhrugesh
>
>